Commit graph

841 commits

Author SHA1 Message Date
Martin Weinelt 02e44ee3be
Merge pull request #174804 from dotlambda/prometheus-dmarc-exporter-no-poetry2nix 2022-06-01 01:46:30 +02:00
Robert Schütz aff15c41fc dmarc-metrics-exporter: rename from prometheus-dmarc-exporter
Also stop using poetry2nix.
2022-05-31 23:25:18 +00:00
Maximilian Bosch 185ee01e80
Merge pull request #173273 from kfollesdal/grafana-azuread
nixos/grafana: add new options to grafana module
2022-05-31 19:24:33 +02:00
Jörg Thalheim d32a2bf207 nixos/mimir: also expose mimirtool to users 2022-05-29 03:49:17 -04:00
Jörg Thalheim 6497902407 nixos/mimir: set workingdirectory
Mimir writes files relatative to its working directory.
With this option less files have to be configured.
2022-05-29 03:49:17 -04:00
Kristoffer Føllesdal 298e2ce302 nixos/grafana: add disableLoginForm option 2022-05-18 16:09:04 +02:00
Kristoffer Føllesdal ea8f7e7bbd nixos/grafana: add serveFromSubPath option 2022-05-18 16:08:15 +02:00
Cole Helbling c0723eef37 nixos/prometheus: enable checking syntax only
This allows config checking with external files to not fail inside the
sandbox.
2022-05-17 10:45:49 -07:00
Kristoffer Føllesdal e13ec87217 nixos/grafana: add Azure AD OAuth options 2022-05-16 16:37:02 +02:00
Sandro befb337461
Merge pull request #169216 from Shawn8901/fix_prometheus_config_generation
nixos/prometheus: use pkgs.formats.json.generate to write config file
2022-05-08 15:09:09 +02:00
happysalada a4707b645f grafana-mimir: add initial module 2022-04-29 07:23:03 -04:00
ajs124 3fedfb5f8a
Merge pull request #110870 from asymmetric/doc/prom-node-exp
docs: modules/prometheus: finish exporter setup
2022-04-18 22:54:01 +01:00
Shawn8901 7f01ff7822 nixos/prometheus: use pkgs.formats.json.generate to write config file
The old way of writing the file omited qoutes within strings which are needed by some configurations like federations.
The quotes got lost when `echo`ing the content via `echo '${builtins.toJSON x}'`.
The pkgs.formats.json does handle that race condition properly, so this commit switches the writing to that helper.
2022-04-18 18:09:03 +02:00
pacien 68128e7b7e nixos/nagios: replace ssmtp package use with msmtp
The ssmtp program is not maintained and is being removed.

GitHub: see https://github.com/NixOS/nixpkgs/issues/105710
2022-04-17 00:44:50 +02:00
Lassulus 807b226542
Merge pull request #162777 from amarshall/prom-deprecated-opt
nixos/prometheus: Remove upstream-deprecated alertManagerTimeout
2022-04-12 09:07:51 +01:00
Andrew Marshall 3bbfc7849e nixos/prometheus: Remove upstream-deprecated alertManagerTimeout
When started, Prometheus prints:

> The flag --alertmanager.timeout has no effect and will be removed in
> the future.

See also
2316062d4e
2022-04-11 23:37:33 -04:00
Guillaume Girol 44a3d91e5f nixos/collectd: put extraconfig before plugins
this is necessary to override the global option Interval.
If set after the plugins, it has no effect.
2022-04-03 17:25:26 +02:00
Florian Klink c57c5c42a4 prometheus-bird-exporter: update birdSocket default path
a5276e1fbd updated bird to use
/run/bird/bird.ctl, but didn't update the default used for
prometheus-bird-exporter.

Reported-In: https://github.com/NixOS/nixpkgs/pull/161193#issuecomment-1086228985
2022-04-01 22:59:48 +02:00
Martin Weinelt 35b3c26351
Merge pull request #164533 from mweinelt/kea-exporter-after-kea
nixos/prometheus-exporters/kea: wait for kea
2022-03-30 00:03:03 +02:00
Moritz 9f715a3d31
nixos/grafana: Add foldersFromFilesStructure option for dashboard provisioning (#132348) 2022-03-29 10:53:39 +02:00
Janne Heß a34c788e30
Merge pull request #163230 from helsinki-systems/feat/misc-prometheus-varnis
nixos/prometheus/exporters/varnish: improve some defaults
2022-03-26 18:32:30 +01:00
Martin Weinelt 8b7ca8bdcb
nixos/prometheus-exporters/kea: wait for kea
Fixes race conditions like this:

> systemd[1]: Started prometheus-kea-exporter.service.
> kea-exporter[927]: Listening on http://0.0.0.0:9547
> kea-exporter[927]: Socket at /run/kea/dhcp4.sock does not exist. Is Kea running?
> systemd[1]: prometheus-kea-exporter.service: Main process exited, code=exited, status=1/FAILURE
2022-03-17 03:27:21 +01:00
Maximilian Bosch 0c5586c2f2
Merge pull request #162254 from Ma27/init-dmarc-exporter
prometheus-dmarc-exporter: init at 0.5.1
2022-03-14 09:02:08 +01:00
Martin Weinelt 76721f5e5e
Merge pull request #159986 from NukaDuka/pve_exporter 2022-03-10 22:41:45 +01:00
pennae 06c57317c2
Merge pull request #146653 from DarkDNA/nixos/fix-systemd-exporter/extraFlags
nixos/prometheus/systemd: Implement the extraFlags config option.
2022-03-09 16:12:32 +00:00
ajs124 a28591680b nixos/prometheus/exporters/varnish: improve some defaults 2022-03-08 01:42:27 +01:00
Kartik Gokte 6a0b420d94 nixos/prometheus-pve-exporter: init at 2.2.2 2022-03-02 23:59:33 +05:30
Maximilian Bosch 5cee9c9ef2
prometheus-dmarc-exporter: init at 0.5.1 2022-02-28 16:50:01 +01:00
Martin Weinelt 9d8a23f66e
nixos/smartctl-exporter: fix typo in rawio capab 2022-01-30 04:32:15 +01:00
Martin Weinelt 12c26aca1f
prometheus.exporters.smartctl: Fix autodiscovery
When no devices are given the exporter tries to autodiscover available
disks. The previous DevicePolicy was however preventing the exporter
from accessing any device at all, since only explicitly mentioned ones
were allowed.

This commit adds an allow rule for several device classes that I could
find on my machines, that gets set when no devices are explicitly
configured.

There is an existing problem with nvme devices, that expose a character
device at `/dev/nvme0`, and a (namespaced) block device at
`/dev/nvme0n1`. The character device does not come with permissions that
we could give to the exporter without further impacting the hardening.

  crw------- 1 root root 247, 0 27. Jan 03:10 /dev/nvme0
  brw-rw---- 1 root disk 259, 0 27. Jan 03:10 /dev/nvme0n1

The autodiscovery only finds the character device, which the exporter
unfortunately does not have access to.

However a simple udev rule can be used to resolve this:

  services.udev.extraRules = ''
    SUBSYSTEM=="nvme", KERNEL=="nvme[0-9]*", GROUP="disk"
  '';

Unfortunately I'm not fully aware of the security implications this
change carries and we should question upstream (systemd) why they did
not include such a rule.
The disk group has no members on any of my machines.

  ❯ getent group disk
  disk6:
2022-01-27 17:33:27 +01:00
Martin Weinelt f860b289d4
prometheus.exporters.smartctl: Allow RAWIO
This allows the exporter to perform SCSI commands and interact with hpsa
and cciss devices.
2022-01-27 13:49:25 +01:00
misuzu 768d0d6098 nixos/netdata: expose /etc/netdata 2022-01-10 23:56:57 +02:00
misuzu 9e6145c73b nixos/netdata: add configDir option
This option makes the complete netdata configuration directory available for
modification. The default configuration is merged with changes
defined in the configDir option.

Co-authored-by: Michael Raitza <spacefrogg-github@meterriblecrew.net>
2022-01-10 23:56:53 +02:00
Sandro Jäckel 39ce4ddd85
nixos/prometheus: fix usage of bearer_token 2022-01-08 22:56:51 +01:00
Jörg Thalheim fd0a6311a7 prometheus: add authorization section 2022-01-03 12:04:08 +01:00
Bobby Rong 7378b39d1d
Merge pull request #149704 from squalus/nginx-prometheus-exporter-fix
nixos/prometheus-nginx-exporter: fix argument syntax
2021-12-23 10:27:16 +08:00
Guillaume Girol d96a3994cc nixos/collectd: validate config file syntax at build time 2021-12-23 00:08:43 +01:00
Graham Christensen 3907d19260 services.prometheus.exporters.fastly: add a smoke test 2021-12-20 10:57:31 -05:00
Graham Christensen 1753f97e13 services.prometheus.exporters.fastly: fixup broken module config 2021-12-20 10:29:13 -05:00
Graham Christensen 06edb74413
Merge pull request #148785 from pennae/more-option-doc-staticizing
treewide: more defaultText for options
2021-12-17 11:14:08 -05:00
pennae e67a646a92 treewide: add defaultText to remaining options
these are mostly options that use alias bindings, bindings to constants,
or bindings to calculated values.
2021-12-09 01:42:24 +01:00
pennae 9407761763 treewide: add defaultText for options using other shortcut bindings 2021-12-09 01:42:24 +01:00
pennae 2d564521c0 treewide: add literalDocBook text to options with complex defaults
some options have default that are best described in prose, such as
defaults that depend on the system stateVersion, defaults that are
derivations specific to the surrounding context, or those where the
expression is much longer and harder to understand than a simple text
snippet.
2021-12-09 01:38:24 +01:00
pennae ed673a69db treewide: add defaultText for options with simple cfg.* expression defaults
adds defaultText for options with defaults that use only literals, full config.*
paths, and the cfg shortcut binding.
2021-12-09 01:14:16 +01:00
pennae fb0e5be843 treewide: add defaultText for options with simple interpolation defaults
adds defaultText for all options that use `cfg.*` values in their
defaults, but only for interpolations with no extra processing (other
than toString where necessary)
2021-12-09 01:13:48 +01:00
pennae e24a8775a8 treewide: set defaultText for options using simple path defaults
adds defaultText for all options that set their default to a path expression
using the ubiquitous `cfg` shortcut bindings.
2021-12-09 01:12:13 +01:00
squalus c3ab9e6d40 nixos/prometheus-nginx-exporter: fix argument syntax
Arguments were being ignored because the program expects an equals sign
to separate the argument name from the value.

Documented in https://github.com/nginxinc/nginx-prometheus-exporter/issues/153

Fixes #107541
2021-12-08 11:32:13 -08:00
Robert Hensing 862d167f17
Merge pull request #147441 from pennae/option-doc-staticizing
nixos/*: add trivial defaultText to options where applicable
2021-12-06 01:35:38 +01:00
Jörg Thalheim 8ae2771224
Merge pull request #148729 from bjornfor/add-missing-collectd-group-v2
nixos/collectd: add missing group
2021-12-05 17:18:55 +00:00
Bjørn Forsman 05bc708a7f nixos/collectd: add missing group
While upgrading my NixOS system I was greeted by this error:

  error:
  Failed assertions:
  - users.users.collectd.group is unset. This used to default to
  nogroup, but this is unsafe. For example you can create a group
  for this user with:
  users.users.collectd.group = "collectd";
  users.groups.collectd = {};

Let's fix it.
2021-12-05 17:17:12 +01:00