WilliButz
5818c73d95
nixos/prometheus-exporters: add mail exporter module
2019-07-30 19:24:26 +02:00
WilliButz
5dc50eab68
Merge pull request #65102 from d-goldin/patch-1
...
docs prometheus.exporters: typo fix.
2019-07-23 10:06:20 +02:00
WilliButz
c64f621bfd
nixos/prometheus-nginx-exporter: update module
...
Update exporter submodule to match the new exporter version.
2019-07-22 16:41:10 +02:00
WilliButz
fb6f0a48bb
nixos/prometheus-exporters: add option renaming for submodules
...
Adds the functionality to create option renamings and removals
for exporter submodules as in nixos/modules/rename.nix.
2019-07-22 16:41:10 +02:00
WilliButz
774221191d
nixos/prometheus-exporters: refactor imports, replace 'with lib;'
...
Pass through 'options' to exporter definitions and replace 'with lib;'
by explicit function imports.
2019-07-22 16:41:09 +02:00
WilliButz
01ee2ee2ba
nixos/test: fix prometheus-{bind,varnish}-exporter tests
2019-07-22 16:41:09 +02:00
Maximilian Bosch
7095bdf988
nixos/prometheus-exporters/wireguard: add support for `-s` switch
...
Since version 3.0 all allowed IPs and subnets are exposed by the
exporter. With `-s` set on the CLI, instead of a comma-separated list,
each allowed IP and subnet will be in a single field with the schema
`allowed_ip_<index>`.
2019-07-21 21:39:49 +02:00
Dima
186222ce7b
Fixing minor typo in prometheus exporters doc
2019-07-19 21:13:57 +02:00
Ivan Kozik
41c6d7adfc
nixos/prometheus-node-exporter: fix systemd unit for systemd 242 ( #63540 )
...
Avoid having a backslash at the end of ExecStart=.
See https://github.com/NixOS/nixpkgs/issues/63533 for details
about the change to systemd's unit parser.
Fixes #63383 .
2019-06-20 17:04:36 -04:00
Jan Tojnar
11cb382a4c
nixos/doc: Fix spurious indentation
2019-06-17 12:28:26 +02:00
Maximilian Bosch
bf09e6a14e
prometheus-wireguard-exporter: init at 2.0.1
...
This is a simple exporter which exports the information
provided by `wg show all dump` to prometheus.
Co-authored-by: Franz Pletz <fpletz@fnordicwalking.de>
2019-06-07 17:40:44 +02:00
WilliButz
ba17b32b43
nixos/prometheus-fritzbox-exporter: update binary name
2019-05-31 18:50:27 +02:00
Bas van Dijk
cdd82681b3
nixos/prometheus: add more missing options
2019-04-18 12:53:13 +02:00
Bas van Dijk
285fd3c05a
nixos/prometheus: abstract over optional option creation
2019-04-18 11:55:43 +02:00
Bas van Dijk
55ef5d4246
nixos/prometheus: set optional attributes to type types.nullOr
...
This makes sure that when a user hasn't set a Prometheus option it
won't show up in the prometheus.yml configuration file. This results
in smaller and easier to understand configuration files.
2019-04-17 14:49:09 +02:00
Bas van Dijk
57e5b75f9c
nixos/prometheus: filter out the _module attr in a central place
...
We previously filtered out the `_module` attribute in a NixOS
configuration by filtering it using the option's `apply` function.
This meant that every option that had a submodule type needed to have
this apply function. Adding this function is easy to forget thus this
mechanism is error prone.
We now recursively filter out the `_module` attributes at the place we
construct the Prometheus configuration file. Since we now do the filtering
centrally we don't have to do it per option making it less prone to errors.
2019-04-17 14:08:16 +02:00
Bas van Dijk
a913d0891c
nixos/prometheus: filter out empty srcape_configs attributes
...
This results in a smaller prometheus.yml config file.
It also allows us to use the same options for both prometheus-1 and
prometheus-2 since the new options for prometheus-2 default to null
and will be filtered out if they are not set.
2019-04-16 16:06:11 +02:00
Bas van Dijk
a23db5db08
nixos/prometheus: add new ec2_sd_config options for prometheus2
2019-04-16 16:04:33 +02:00
Andrew Childs
ad7e232f88
nixos/prometheus: add `ec2_sd_configs` section to `scrape_configs`
2019-04-16 13:43:52 +02:00
Bas van Dijk
d1940beb3a
nixos/prometheus/pushgateway: add module and test
2019-04-16 08:09:38 +02:00
Enno Lohmeier
da7aeb1b7d
prometheus: add tls_config
2019-04-11 20:34:31 +02:00
Bas van Dijk
cd4486ecc3
nixos/prometheus/alertmanager: use DynamicUser instead of nobody
...
See issue #55370
2019-04-10 20:38:40 +02:00
Bas van Dijk
739bdff4a4
nixos/prometheus/alertmanager: use ExecStart instead of script
...
This results in a simpler service unit which doesn't first have to
start a shell:
> cat /nix/store/s95nsr8zbkblklanqpkiap49mkwbaq45-unit-alertmanager.service/alertmanager.service
...
ExecStart=/nix/store/4g784lwcy7kp69hg0z2hfwkhjp2914lr-alertmanager-0.16.2-bin/bin/alertmanager \
--config.file /nix/store/p2c7fyi2jkkwq04z2flk84q4wyj2ggry-checked-config \
--web.listen-address [::1]:9093 \
--log.level warn
...
2019-04-10 15:03:09 +02:00
Bas van Dijk
c95179b52f
nixos/prometheus: add back the option services.prometheus.dataDir
...
This is to ensure more backwards compatibility. Note this is not 100%
backwards compatible because we now require dataDir to begin with /var/lib/.
2019-04-09 13:13:34 +02:00
Bas van Dijk
eed84d1f8d
nixos/prometheus: fix indentation and unnecessary parenthesis
2019-04-08 19:14:42 +02:00
Bas van Dijk
7cf27feb2f
nixos/prometheus: get rid of empty arguments
...
Previously the prometheus.service file looked like:
ExecStart=/nix/store/wjkhfw3xgkmavz1akkqir99w4lbqhak7-prometheus-1.8.2-bin/bin/prometheus -storage.local.path=/var/lib/prometheus/metrics \
-config.file=/nix/store/zsnvzw51mk3n1cxjd0351bj39k1j6j27-prometheus.yml-check-config-checked \
-web.listen-address=0.0.0.0:9090 \
-alertmanager.notification-queue-capacity=10000 \
-alertmanager.timeout=10s \
\
Restart=always
Now it's:
ExecStart=/nix/store/wjkhfw3xgkmavz1akkqir99w4lbqhak7-prometheus-1.8.2-bin/bin/prometheus \
-storage.local.path=/var/lib/prometheus/metrics \
-config.file=/nix/store/zsnvzw51mk3n1cxjd0351bj39k1j6j27-prometheus.yml-check-config-checked \
-web.listen-address=0.0.0.0:9090 \
-alertmanager.notification-queue-capacity=10000 \
-alertmanager.timeout=10s
Restart=always
2019-04-08 14:59:12 +02:00
Bas van Dijk
a59c92903e
nixos/prometheus: use ExecStart instead of a shell script
...
This uses fewer lines of code and one less process.
2019-04-08 14:59:12 +02:00
Jean-Baptiste Giraudeau
0333d877c2
Use same user for both prometheus 1 and 2. Use StateDirectory.
2019-03-25 14:49:22 +01:00
Jean-Baptiste Giraudeau
5ae25922b5
Prometheus2: --web.external-url need two dash.
2019-03-25 14:36:48 +01:00
Jean-Baptiste Giraudeau
bfbae97cfa
Rollback versionning of services.prometheus.{exporters, alertmanager}.
2019-03-25 14:36:46 +01:00
Alberto Berti
e17b464a43
Fix alertmanager service definition. Thanks to @eonpatapon
2019-03-25 14:36:45 +01:00
Alberto Berti
1b6ce80c2b
Make it pass a minimal test
2019-03-25 14:36:44 +01:00
Alberto Berti
11b89720b7
Add prometheus2 configuration to the prometheus modules
...
As the configuration for the exporters and alertmanager is unchanged
between the two major versions this patch tries to minimize
duplication while at the same time as there's no upgrade path from 1.x
to 2.x, it allows running the two services in parallel. See also #56037
2019-03-25 14:36:44 +01:00
Andrew Childs
c53703a6b2
nixos/prometheus: use append instead of insert for opening firewalls ( #55224 )
...
Inserting with `-I` causes the rules to placed before `ctstate`
tracking, while `-A` places them alongside all other allow rules.
2019-03-13 12:44:36 +02:00
Tom F
9f07fa719c
Document the addresses Alertmanager will listen on ( #56409 )
...
https://github.com/golang/go/issues/9334 describes how net.Listen (as used by Alertmanager):
* listens on 127.0.0.1 if the listenAddress is "localhost"
* listens on all interfaces if the listenAddress is ""
2019-02-26 14:59:11 +01:00
Symphorien Gibol
a915b33315
nixos: add preferLocalBuild=true; on derivations for config files
2019-02-22 20:11:27 +01:00
Silvan Mosberger
7222fd9e21
Merge pull request #53986 from Ma27/document-dovecot-prometheus-exporter-issues
...
nixos/prometheus-dovecot-exporter: enhance `socketPath` documentation
2019-01-24 00:17:20 +01:00
Maximilian Bosch
ca72dbd125
nixos/prometheus-dovecot-exporter: enhance `socketPath` documentation
...
In Dovecot 2.3[1] the stats module changed and now the UNIX socket
provided by Dovecot by default isn't compatible anymore with the
exporter[2]. By enabling the `old-stats` plugin in Dovecot this issue
can be solved which should be documented in this module.
[1] https://wiki2.dovecot.org/Upgrading/2.3
[2] https://github.com/kumina/dovecot_exporter/issues/8
2019-01-23 23:51:48 +01:00
Maximilian Bosch
003132c2dd
nixos/prometheus: make `source_labels` optional
...
It's possible to skip `source_labels` entirely, an example for this is
the blackbox exporter configuration:
https://github.com/prometheus/blackbox_exporter#prometheus-configuration
2019-01-16 14:01:43 +01:00
Jean-Philippe Braun
4f99f8d2cb
nixos/prometheus-bind-exporter: add module
2019-01-03 21:14:21 +01:00
Pierre Bourdon
3873f43fc3
prometheus/exporters: fix regression in DynamicUser behavior
...
Instead of setting User/Group only when DynamicUser is disabled, the
previous version of the code set it only when it was enabled. This
caused services with DynamicUser enabled to actually run as nobody, and
services without DynamicUser enabled to run as root.
Regression from fbb7e0c82f
.
2018-12-05 11:26:38 +01:00
Pierre Bourdon
199b4c4743
prometheus/exporters/tor: make CPython happy by defining $HOME
2018-12-05 11:26:38 +01:00
Andreas Rammhold
51c3082119
nixos/prometheus: require one alertmanager configuration parameter
...
This commit adds an assertion that checks that either `configFile` or
`configuration` is configured for alertmanager. The alertmanager config
can not be an empty attributeset. The check executed with `amtool` fails
before the service even has the chance to start. We should probably not
allow a broken alertmanager configuration anyway.
This also introduces a test for alertmanager configuration that piggy
backs on the existing prometheus tests.
2018-11-23 19:45:17 +01:00
Andreas Rammhold
b1032db5a9
nixos/prometheus: check alertmanager configuration
2018-11-23 19:45:17 +01:00
Andreas Rammhold
d1ef00ebee
nixos/prometheus: add `package` option to alertmanager
2018-11-23 19:45:17 +01:00
Andreas Rammhold
6795bdd58c
nixos/prometheus: check configuration before starting service
...
With `promtool` we can check the validity of a configuration before
deploying it. This avoids situations where you would end up with a
broken monitoring system without noticing it - since the monitoring
broke down. :-)
2018-11-04 15:08:44 +01:00
Andreas Rammhold
0de150e0f2
nixos/prometheus: add `package` option
...
With a package option we can let the user decide what package to use for
prometheus without requiring an overlay.
2018-11-04 15:08:44 +01:00
Pierre Bourdon
cf58856d90
nixos/prometheus: add webExternalUrl option
...
Similar to the prometheus.alertmanager.webExternalUrl option, but for
Prometheus itself.
2018-10-20 13:45:55 +02:00
Pierre Bourdon
86d644f8cc
prometheus-tor-exporter: init at 0.3
...
Upstream: https://github.com/atx/prometheus-tor_exporter
2018-10-13 10:10:29 +02:00
WilliButz
fbb7e0c82f
nixos/prometheus-exporters: fix unapplied service config
...
Prior to this commit, the default values for `Restart`, `PrivateTmp` and
`WorkingDirectory` were falsely ignored.
I also added myself as maintainer.
2018-10-08 17:21:49 +02:00
WilliButz
24320f4a9e
nixos/prometheus-varnish-exporter: avoid crash on restart
2018-10-08 17:21:48 +02:00
Andrew Childs
c477d6658c
nixos/prometheus-snmp-exporter: fix command line argument format
2018-10-07 11:35:55 +09:00
Matthew Bauer
907afd17f9
Merge pull request #46068 from azazel75/alertmanager-flags
...
Prometheus Alertmanager: Allow the definition of extra options on commandline
2018-10-05 22:52:48 -05:00
Graham Christensen
8413f22bb3
docs: format
2018-09-29 20:51:11 -04:00
Alberto Berti
69e4e4934d
Allow the definition of extra options on commandline
...
I stumbled upon an issue with the Alertmanager that required
an additional comand line option. See https://groups.google.com/forum/#!msg/prometheus-users/-5wd-P13xCI/lGLBHHgnBgAJ
2018-09-04 23:19:26 +02:00
Graham Christensen
34d2ec7c09
nixos docs: give IDs to things
2018-09-01 16:20:49 -04:00
WilliButz
9216da8928
nixos/prometheus-exporters: use nixos-fw chain
...
Use nixos-fw chain instead of INPUT so that the rules don't keep
stacking everytime the firewall is reloaded.
This also adds a comment to each rule about the associated exporter.
2018-08-03 13:20:53 +02:00
volth
2e979e8ceb
[bot] nixos/*: remove unused arguments in lambdas
2018-07-20 20:56:59 +00:00
Florian Klink
fff5923686
nixos/modules: users.(extraUsers|extraGroup->users|group)
2018-06-30 03:02:58 +02:00
Matthew Justin Bauer
bc7ea93a47
Merge pull request #40028 from WilliButz/add-dnsmasq-exporter
...
prometheus-dnsmasq-exporter: init at 2018-05-05, add module
2018-06-01 23:18:49 -04:00
WilliButz
de5205ae2d
nixos/prometheus-node-exporter: fix file collector
2018-05-24 04:40:46 +02:00
WilliButz
e2dfac67f7
nixos/promtheus-dnsmasq-exporter: add module
2018-05-06 13:58:39 +02:00
WilliButz
27eb2859f2
prometheus-nginx-exporter: fix bool to string coercion
2018-05-02 16:18:20 +02:00
Samuel Leathers
78f09c9102
nixos/prometheus-surfboard-exporter: add new module
2018-05-02 13:04:34 +02:00
WilliButz
cb4c2834ef
nixos/prometheus-varnish-exporter: update module
2018-05-01 18:00:53 +02:00
WilliButz
de60146f59
nixos/promtheus-nginx-exporter: update module
2018-05-01 15:45:48 +02:00
WilliButz
c3d46165db
nixos/prometheus-postfix-exporter: update module
2018-04-19 19:47:13 +02:00
WilliButz
01af301443
prometheus-exporters: add dovecot exporter module
2018-04-19 00:35:27 +02:00
WilliButz
c54aa1f293
nixos/prometheus-exporters: add postfix exporter & documentation
2018-03-22 14:52:23 +01:00
WilliButz
f4d03b5c9c
nixos/prometheus-exporters: rewrite and restructure
...
- prometheus exporters are now configured with
`services.prometheus.exporters.<name>`
- the exporters are now defined by attribute sets
from which the options for each exporter are generated
- most of the exporter definitions are used unchanged,
except for some changes that should't have any impact
on the functionality.
2018-03-22 14:46:17 +01:00
Ruben Maher
ac52cb3aed
nixos/prometheus/alertmanager: double hyphenate long opts ( #34914 )
...
Alertmanager 0.13.0 doesn't support single dash long options, so '-config.file'
for example is parsed as '-c', which leads to the service not starting.
2018-02-12 18:02:38 -05:00
Oliver Charles
560400773c
nixos/prometheus: Correct documentation for external_labels
...
As description is literal XML, I need to escape < and > by hand.
2017-11-17 11:06:03 +00:00
Oliver Charles
acb7f43db9
nixos/prometheus: add external_labels option
2017-11-17 10:16:21 +00:00
Oliver Charles
f0334c0336
nixos/prometheus: add scrape_configs.honor_labels
2017-11-17 10:15:37 +00:00
Franz Pletz
a26b6c4290
prometheus-node-exporter service: delete dead code
2017-10-25 20:18:33 +02:00
Franz Pletz
ce301ef21a
prometheus-node-exporter service: add disabledCollectors option
2017-10-25 20:10:20 +02:00
Franz Pletz
63bbada520
prometheus-node-exporter service: run as nobody again
...
Using DynamicUser breaks the systemd and logind collectors.
cc #30535
2017-10-25 17:49:40 +02:00
Pascal Bach
0f0f0cbc6f
prometheus-node-exporter service: update for new arguments handling
...
The behaviour have changed again. Listed collectors are now enabled in
addition to the default one.
Also run as DynmicUser instead of user nobody as the exporter doesn't need
any state.
2017-10-22 14:45:48 +02:00
Joerg Thalheim
e7e4e0c3b6
nixos/prometheus-minio-exporter: only inherit keys from minio if set
2017-10-08 15:05:25 +01:00
Pascal Bach
8e10a4d862
prometheus-minio-exporter service: default to local minio server if enabled
2017-10-08 15:09:25 +02:00
Pascal Bach
aad88ddf5b
prometheus-minio-exporter service: init version
2017-10-08 12:47:00 +02:00
Pascal Bach
a217d73381
node-exporter service: fix documentation for enabledCollectors
2017-09-12 22:38:17 +02:00
Pascal Bach
334e23d244
nixos/prometheus-collectd-exporter: init module ( #29212 )
...
* prometheus-collectd-exporter service: init module
Supports JSON and binary (optional) protocol
of collectd.
* nixos/prometheus-collectd-exporter: submodule is not needed for collectdBinary
2017-09-11 19:17:00 +01:00
Robin Gloster
ce7e2c06b1
prometheus-unifi-exporter: make ordering more robust
2017-08-22 20:26:18 +02:00
Franz Pletz
5d2764eb68
prometheus-blackbox-exporter: 0.5.0 -> 0.8.1
2017-08-12 11:05:23 +02:00
Franz Pletz
271d3f7a43
prometheus service: globalConfig.labels is obsolete
...
Due to the version bump in e60c958811
.
2017-06-27 01:53:03 +02:00
John Ericson
37e5e71fdf
Merge pull request #24974 from Ericson2314/mapNullable
...
Introduce `mapNullable` into lib and use it in a few places
2017-04-17 17:12:14 -04:00
John Ericson
85aa5005af
Introduce `mapNullable` into lib and use it in a few places
...
Also simply some configure flag logic my grep also alerted me too.
2017-04-17 17:04:04 -04:00
Franz Pletz
4f0dd2f746
prometheus service: add scrapeConfigs.params option
2017-04-10 14:31:27 +02:00
Pascal Bach
3728143cbc
prometheus-unifi-exporter: init at 0.4.0
2017-03-17 15:41:22 +01:00
Pascal Bach
a8cca7037e
prometheus-fritzbox-exporter: init at 1.0
2017-03-15 17:22:36 +01:00
Benjamin Staffin
1c555e772e
Merge pull request #23155 from doshitan/fix-prometheus-basic-auth
...
prometheus service: fix basic auth option
2017-02-24 15:08:35 -05:00
Tanner Doshier
b846ce5243
prometheus service: fix basic auth option
...
If some configuration is provided, we need to filter out the `_module` key or
else it breaks prometheus.
2017-02-24 13:32:01 -06:00
Franz Pletz
188526da3d
prometheus.blackboxExporter service: add CAP_NET_RAW
...
The blackbox-exporter for prometheus needs CAP_NET_RAW for sending icmp
probes.
2017-02-15 09:35:27 +01:00
Bjørn Forsman
d2413943fa
nixos/prometheus: add configText option for alertmanager
...
The reason being less mental overhead when reading upstream
documentation. Examples can be pasted right into the configuration
instead of translating to Nix attrset first.
2017-01-14 15:41:05 +01:00
oida
d423567a95
prometheus-snmp-exporter: added nixos module
2017-01-09 18:05:28 +01:00
Robin Gloster
575afe3fa7
prometheus exporter modules: unify firewall handling
2017-01-09 15:31:37 +01:00
Corbin
618b249fc5
prometheus module: add blackboxExporter
2017-01-09 15:20:26 +01:00
Corbin
bd45d5fe8d
prometheus module: add jsonExporter
2017-01-09 15:20:26 +01:00
Corbin
1b839a586b
prometheus module: add varnishExporter
2017-01-09 15:20:26 +01:00