The --collector.systemd config argument is unavailable in the
older packages.
The formula handles either scenario so switching the check out from the
test pillar for --log.level=debug instead
Resolved issue identified in pull request check for debian
Added inspec checks for environment files and specifically prometheus
and node_exporter args. Provided comments throughout the key reference
points for users to signpost the differing approaches to args used along
with more clearly identifying the difference between archive and repo
approach. Tests appear to be working on both approaches though updates
have been focused at repo install method.
Fixes: #59
Developed environ.sh.jinja and added test pillar data to default
Corrected prometheus.config.environ ref #59
Switched default test pillar to use none archive - due to deployment of custom service
Disabled a number of exporters following switch from archive due to failing - to be reviewed
Corrected prometheus environ_file location
Resolves: #59
https://gitlab.com/myii/prometheus-formula/-/jobs/1077740890#L779
```
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/salt/utils/templates.py", line 501, in render_jinja_tmpl
output = template.render(**decoded_context)
File "/usr/local/lib/python3.8/dist-packages/jinja2/environment.py", line 1090, in render
self.environment.handle_exception()
File "/usr/local/lib/python3.8/dist-packages/jinja2/environment.py", line 832, in handle_exception
reraise(*rewrite_traceback_stack(source=source))
File "/usr/local/lib/python3.8/dist-packages/jinja2/_compat.py", line 28, in reraise
raise value.with_traceback(tb)
File "<template>", line 212, in top-level template code
File "/usr/local/lib/python3.8/dist-packages/jinja2/sandbox.py", line 462, in call
return __context.call(__obj, *args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/jinja2/sandbox.py", line 173, in safe_range
raise OverflowError(
OverflowError: Range too big. The sandbox blocks ranges larger than MAX_RANGE (100000).
; line 212
---
[...]
skip_verify: true
linux:
# 'Alternatives system' priority: zero disables (default)
# yamllint disable-line rule:braces
altpriority: {{ range(1, 9100000) | random }} <======================
```
this commit makes `service name` to consider pillar provided values,
fallback to a consistent `service name` when {archive|package} is available
for the component, or to `service name == name` when no other value
is provided
BREAKING CHANGE: The data dictionary is simplified and expanded.
Retest your states and update pillar data accordingly.
For developer convenience, clientlibs states were introduced.
See pillar.example, defaults.yaml, and docs/README.
* Semi-automated using `ssf-formula` (v0.5.0)
* Fix errors shown below:
```bash
prometheus-formula$ $(grep "\- yamllint" .travis.yml | sed -e "s:^\s\+-\s\(.*\):\1:")
./prometheus/osfamilymap.yaml
1:89 error line too long (116 > 88 characters) (line-length)
1:24 error trailing spaces (trailing-spaces)
13:2 error syntax error: found character '%' that cannot start any token
24:89 error line too long (90 > 88 characters) (line-length)
25:89 error line too long (167 > 88 characters) (line-length)
./prometheus/defaults.yaml
6:13 error too many spaces inside braces (braces)
6:35 error too many spaces inside braces (braces)
7:11 error too many spaces inside braces (braces)
7:25 error too many spaces inside braces (braces)
8:22 warning truthy value should be one of [false, true] (truthy)
9:25 warning truthy value should be one of [false, true] (truthy)
49:85 error trailing spaces (trailing-spaces)
103:20 warning truthy value should be one of [false, true] (truthy)
104:25 warning truthy value should be one of [false, true] (truthy)
108:16 warning truthy value should be one of [false, true] (truthy)
113:24 warning missing starting space in comment (comments)
pillar.example
31:6 warning missing starting space in comment (comments)
32:8 warning missing starting space in comment (comments)
32:7 warning comment not indented like content (comments-indentation)
51:5 warning comment not indented like content (comments-indentation)
65:89 error line too long (110 > 88 characters) (line-length)
68:29 error too many spaces after colon (colons)
68:34 warning too few spaces before comment (comments)
68:89 error line too long (106 > 88 characters) (line-length)
69:34 warning too few spaces before comment (comments)
69:89 error line too long (98 > 88 characters) (line-length)
75:9 error wrong indentation: expected 10 but found 8 (indentation)
76:11 error wrong indentation: expected 12 but found 10 (indentation)
77:13 warning comment not indented like content (comments-indentation)
79:89 error line too long (101 > 88 characters) (line-length)
81:9 warning comment not indented like content (comments-indentation)
86:89 error line too long (103 > 88 characters) (line-length)
91:11 error wrong indentation: expected 12 but found 10 (indentation)
106:15 error wrong indentation: expected 16 but found 14 (indentation)
108:41 warning too few spaces before comment (comments)
118:89 error line too long (96 > 88 characters) (line-length)
139:13 error wrong indentation: expected 14 but found 12 (indentation)
143:7 error wrong indentation: expected 8 but found 6 (indentation)
145:9 error wrong indentation: expected 10 but found 8 (indentation)
157:6 warning missing starting space in comment (comments)
158:20 error too many spaces inside braces (braces)
158:47 error too many spaces inside braces (braces)
```