Commit Graph

319 Commits

Author SHA1 Message Date
Aaron Andersen
fc1f33bc2c fixed issue with system jobs 2018-08-27 15:23:19 +00:00
Aaron Andersen
fc03a9f5b7 initial work on incron service 2018-08-25 18:08:24 -04:00
Sarah Brofeldt
8f61e96c1e nixos/datadog-agent: Fix type of use_dogstatsd (#45587) 2018-08-25 00:18:59 +02:00
Vincent Ambo
5b748bd8fa nixos/datadog-agent: Add option to configure datadog integrations
Introduces an option `services.datadog-agent.extraIntegrations` that
can be set to include additional Datadog agent integrations from the
integrations-core repository.

Documentation and an example is provided with the change.

Relates to NixOS/nixpkgs#40399
2018-08-09 17:25:23 +02:00
Vincent Ambo
5a07bb2fc7 nixos/datadog-agent: Refactor to allow arbitrary check configs
Refactors the datadog-agent (i.e. V6) module to let users configure
arbitrary checks, not just a limited set, without having to resort to
linking the files manually and updating the systemd unit.

Checks are now configured via a `services.datadog-agent.checks` option
which takes an attribute set in which the keys refer directly to
Datadog check names, and the values are attribute sets representing
Datadog's configuration structure.

With this mechanism users can configure arbitrary integrations, for
example for the `ntp`-check, simply by saying:

    services.datadog-agent.checks.ntp = {
      init_config = null;
      # ... other check configuration options as per Datadog
      # documentation
    };

The previous check-specific configuration options for non-default
checks have been removed. Disk & network check configuration options
have been kept rather than making them a `default`-value of the
`checks`-option because they will be overridden by user-configurations
in that case.

Relates to NixOS/nixpkgs#40399.
2018-08-09 17:25:23 +02:00
Rodney Lorrimar
b9486e2b50 nixos/datadog-agent: add module
This is the new v6 version of datadog-agent.

The old v5 module is kept as dd-agent.
2018-08-09 16:53:31 +02:00
Rodney Lorrimar
51618113f4 nixos/dd-agent: Fix dodgy temp files
DataDog was dropping PID files and and python pickle files in
/tmp. Move these to private directories as a precaution.
2018-08-09 16:53:30 +02:00
Jesper
0254ae4e80 netdata: 1.9.0 -> 1.10.0 (#44472)
The web_access.patch would no longer apply.
It disabled a check that required the static files
for the web UI to be owned by the user the daemon runs as
(not root, so it doesn't work well with nix).

Besides updating netdata, this commit removes that patch,
changes the netdata service config to set the "web files owner/group"
option to "root" and adds a test that checks that the web UI is being served.

This allows the web files to be owned by root without patching.
2018-08-05 00:05:48 +02:00
Bas van Dijk
5a43f6ffeb graphite: make systemd create /run directory for us (#44392) 2018-08-04 20:55:59 +02: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
Bas van Dijk
0aae3fda06 graphite: 1.0.2 -> 1.1.3 & moved dependencies to python-modules (#44276)
Fixes #30891

* Upgrade `graphite-web`, `carbon` and `whisper` from 1.0.2 -> 1.1.3.

* Replaced the deprecated `pythonPackages.graphite_influxdb` with
  `pythonPackages.influxgraph.`

* Renamed `pythonPackages.graphite_web` to `pythonPackages.graphite-web`
  to be consistent with the Python package name.

* Replaced the unmaintained `pythonPackages.graphite_pager` with
  `pythonPackages.graphitepager`

* Moved all new packages from `python-packages.nix` to
  `pkgs/development/python-modules`
2018-08-02 16:39:57 +02:00
Jörg Thalheim
e9ff0f9448
Merge pull request #43863 from volth/unused4
[bot] nixos/*: remove unused arguments in lambdas
2018-07-21 16:39:08 +01:00
volth
2e979e8ceb [bot] nixos/*: remove unused arguments in lambdas 2018-07-20 20:56:59 +00:00
volth
6d2857a311 [bot] treewide: remove unused 'inherit' in let blocks 2018-07-20 19:38:19 +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
Vincent Ambo
f4c87183df nixos/dd-agent: fix runtime errors by adding gohai to $PATH
The Datadog agent requires `gohai` to be available on its `$PATH` in
order to collect certain metrics.

It would previously start up and collect certain types of metrics, but
log errors related to the missing gohai binary.

This commit configures the systemd-unit to make gohai available at
runtime.

This fixes #39810.
2018-05-24 10:58:28 +02: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
Ben Wolsieffer
ed6f1761cc grafana: support socket protocol 2018-04-12 22:49:15 -04:00
Ryan Mulligan
690fcc97ef nixos/monit: restart if config changes 2018-03-28 15:21:56 -07: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
WilliButz
ca7b29050f grafana: 5.0.2 -> 5.0.3, fix headless phantomjs 2018-03-19 19:59:10 +01:00
Tuomas Tynkkynen
1e107443ad Merge commit '618ac29687a650d854c8bea7efd4490387589ce2' into staging 2018-03-03 22:40:32 +02:00
Shea Levy
fec543436d
nixos: Move uses of stdenv.shell to runtimeShell. 2018-03-01 14:38:53 -05:00
WilliButz
5ea2c87464
grafana: 4.6.3 -> 5.0.0 2018-03-01 17:50:09 +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
Casey Ransom
f3cba4f6bb netdata service: fix permissions for apps.plugin
apps.plugin requires capabilities for full process monitoring. with
1.9.0, netdata allows multiple directories to search for plugins and the
setuid directory can be specified here.

the module is backwards compatible with older configs. a test is
included that verifies data gathering for the elevated privileges. one
additional attribute is added to make configuration more generic than
including configuration in string form.
2018-01-02 17:57:19 -05:00
Kevin Hanselman
65fb15aaf8 nixos/smartd: allow extra cli options for daemon
This enables further customization of smartd.
2017-12-19 18:43:49 +01:00
Maximilian Bosch
aaf1e1c4fb statsd: restore support for {influx,librato,stackdriver} backends
These packages will be placed into an environment using
`backendsToPackages`. This function explicitly maps backends to
`pkgs.nodePackages.${type}` unless it's a builtin. This ensures that only
valid backends that work on NixOS are used (if not, the build already
breaks at evaluation time).

The log will be redirected to `stdout` to be able to watch the entire
output using `journalctl`.

Configuration parameters for the backends need to be set using
`services.statsd.extraConfig` as each backend has its own options and
all of them shouldn't be validated and checked explicitly and manually.
2017-12-04 16:56:16 +01:00
Philipp Hausmann
5f59913c74 FusionInventory: 3.18 -> 3.21 2017-11-29 14:58:36 +00:00
Ollie Charles
6ece306812 nixos/grafana: Fix type of database.type option
If you want to use grafana with PostgreSQL, the type is `postgres`,
not `postgresql`.
2017-11-28 11:57:35 +00:00
Kjetil Orbekk
bd3e49a80e nixos/munin: fix broken plugin wrappers
The munin-node service used wrapProgram to inject environment variables.
This doesn't work because munin plugins depend on argv[0], which is
overwritten when the executable is a script with a shebang line (example
below).

This commit removes the wrappers and instead passes the required
environment variables to munin-node.

Eliminating the wrappers resulted in some broken plugins, e.g., meminfo
and hddtemp_smartctl. That was fixed with the per-plugin configuration.

Example:

  The plugin if_eth0 is a symlink to /.../plugins/if_, which uses $0
  to determine that it should monitor traffic on the eth0 interface.

  if_ is a wrapped program, and runs `exec -a "$0" .if_-wrapped`

  .if_-wrapped has a "#!/nix/.../bash" line, which results in bash
  changing $0, and as a result the plugin thinks my interface
  is called "-wrapped".
2017-11-25 11:23:56 +01: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
Matt McHenry
292715ce23 smartd: fix 'cat: command not found' error 2017-11-13 12:52:24 -05:00
Guillaume Maudoux
7325ad9ab7 graphite: override django and django_tagging
instead of depending on specific versions in the django_tagging_0_4_3
and graphite_web derivations.

This should fix: https://github.com/NixOS/nixpkgs/pull/30277#discussion_r145393088

This was joint work of @basvandijk and @layus at NixCon 2017.
2017-11-04 17:53:35 +01:00
Bas van Dijk
04b2460eb6 graphite: fix the graphiteApi service 2017-10-31 15:49:59 +01: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