mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 00:43:20 +00:00
prometheus-openldap-exporter: remove (#338824)
This commit is contained in:
commit
6cc3e274c9
@ -453,6 +453,8 @@
|
||||
|
||||
- The `shadowstack` hardening flag has been added, though disabled by default.
|
||||
|
||||
- `prometheus-openldap-exporter` was removed since it was unmaintained upstream and had no nixpkgs maintainers.
|
||||
|
||||
- `restic` module now has an option for inhibiting system sleep while backups are running, defaulting to off (not inhibiting sleep), available as [`services.restic.backups.<name>.inhibitsSleep`](#opt-services.restic.backups._name_.inhibitsSleep).
|
||||
|
||||
- Support for *runner registration tokens* has been [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/380872)
|
||||
|
@ -63,7 +63,6 @@ let
|
||||
"nginxlog"
|
||||
"node"
|
||||
"nut"
|
||||
"openldap"
|
||||
"pgbouncer"
|
||||
"php-fpm"
|
||||
"pihole"
|
||||
|
@ -1,66 +0,0 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.services.prometheus.exporters.openldap;
|
||||
inherit (lib) mkOption types concatStringsSep;
|
||||
in {
|
||||
port = 9330;
|
||||
extraOpts = {
|
||||
ldapCredentialFile = mkOption {
|
||||
type = types.path;
|
||||
example = "/run/keys/ldap_pass";
|
||||
description = ''
|
||||
Environment file to contain the credentials to authenticate against
|
||||
`openldap`.
|
||||
|
||||
The file should look like this:
|
||||
```
|
||||
---
|
||||
ldapUser: "cn=monitoring,cn=Monitor"
|
||||
ldapPass: "secret"
|
||||
```
|
||||
'';
|
||||
};
|
||||
protocol = mkOption {
|
||||
default = "tcp";
|
||||
example = "udp";
|
||||
type = types.str;
|
||||
description = ''
|
||||
Which protocol to use to connect against `openldap`.
|
||||
'';
|
||||
};
|
||||
ldapAddr = mkOption {
|
||||
default = "localhost:389";
|
||||
type = types.str;
|
||||
description = ''
|
||||
Address of the `openldap`-instance.
|
||||
'';
|
||||
};
|
||||
metricsPath = mkOption {
|
||||
default = "/metrics";
|
||||
type = types.str;
|
||||
description = ''
|
||||
URL path where metrics should be exposed.
|
||||
'';
|
||||
};
|
||||
interval = mkOption {
|
||||
default = "30s";
|
||||
type = types.str;
|
||||
example = "1m";
|
||||
description = ''
|
||||
Scrape interval of the exporter.
|
||||
'';
|
||||
};
|
||||
};
|
||||
serviceOpts.serviceConfig = {
|
||||
ExecStart = ''
|
||||
${pkgs.prometheus-openldap-exporter}/bin/openldap_exporter \
|
||||
--promAddr ${cfg.listenAddress}:${toString cfg.port} \
|
||||
--metrPath ${cfg.metricsPath} \
|
||||
--ldapNet ${cfg.protocol} \
|
||||
--interval ${cfg.interval} \
|
||||
--config ${cfg.ldapCredentialFile} \
|
||||
${concatStringsSep " \\\n " cfg.extraFlags}
|
||||
'';
|
||||
};
|
||||
}
|
@ -929,66 +929,6 @@ let
|
||||
'';
|
||||
};
|
||||
|
||||
openldap = {
|
||||
exporterConfig = {
|
||||
enable = true;
|
||||
ldapCredentialFile = "${pkgs.writeText "exporter.yml" ''
|
||||
ldapUser: "cn=root,dc=example"
|
||||
ldapPass: "notapassword"
|
||||
''}";
|
||||
};
|
||||
metricProvider = {
|
||||
services.openldap = {
|
||||
enable = true;
|
||||
settings.children = {
|
||||
"cn=schema".includes = [
|
||||
"${pkgs.openldap}/etc/schema/core.ldif"
|
||||
"${pkgs.openldap}/etc/schema/cosine.ldif"
|
||||
"${pkgs.openldap}/etc/schema/inetorgperson.ldif"
|
||||
"${pkgs.openldap}/etc/schema/nis.ldif"
|
||||
];
|
||||
"olcDatabase={1}mdb" = {
|
||||
attrs = {
|
||||
objectClass = [ "olcDatabaseConfig" "olcMdbConfig" ];
|
||||
olcDatabase = "{1}mdb";
|
||||
olcDbDirectory = "/var/lib/openldap/db";
|
||||
olcSuffix = "dc=example";
|
||||
olcRootDN = {
|
||||
# cn=root,dc=example
|
||||
base64 = "Y249cm9vdCxkYz1leGFtcGxl";
|
||||
};
|
||||
olcRootPW = {
|
||||
path = "${pkgs.writeText "rootpw" "notapassword"}";
|
||||
};
|
||||
};
|
||||
};
|
||||
"olcDatabase={2}monitor".attrs = {
|
||||
objectClass = [ "olcDatabaseConfig" ];
|
||||
olcDatabase = "{2}monitor";
|
||||
olcAccess = [ "to dn.subtree=cn=monitor by users read" ];
|
||||
};
|
||||
};
|
||||
declarativeContents."dc=example" = ''
|
||||
dn: dc=example
|
||||
objectClass: domain
|
||||
dc: example
|
||||
|
||||
dn: ou=users,dc=example
|
||||
objectClass: organizationalUnit
|
||||
ou: users
|
||||
'';
|
||||
};
|
||||
};
|
||||
exporterTest = ''
|
||||
wait_for_unit("prometheus-openldap-exporter.service")
|
||||
wait_for_open_port(389)
|
||||
wait_for_open_port(9330)
|
||||
wait_until_succeeds(
|
||||
"curl -sSf http://localhost:9330/metrics | grep 'openldap_scrape{result=\"ok\"} 1'"
|
||||
)
|
||||
'';
|
||||
};
|
||||
|
||||
pgbouncer = {
|
||||
exporterConfig = {
|
||||
enable = true;
|
||||
|
@ -1,31 +0,0 @@
|
||||
{ lib, buildGoModule, fetchFromGitHub }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "openldap_exporter";
|
||||
version = "2.2.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tomcz";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-1u+89odwV/lz34wtrK91lET2bOqkH6kRA7JCjzsmiEg=";
|
||||
};
|
||||
|
||||
vendorHash = null;
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
"-X github.com/tomcz/openldap_exporter.tag=v${version}"
|
||||
"-X github.com/tomcz/openldap_exporter.commit=unknown"
|
||||
];
|
||||
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/tomcz/openldap_exporter";
|
||||
description = "Simple service that scrapes metrics from OpenLDAP and exports them via HTTP for Prometheus consumption";
|
||||
mainProgram = "openldap_exporter";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ ma27 ];
|
||||
};
|
||||
}
|
@ -1245,6 +1245,7 @@ mapAliases ({
|
||||
processing3 = throw "'processing3' has been renamed to/replaced by 'processing'"; # Converted to throw 2023-09-10
|
||||
prometheus-dmarc-exporter = dmarc-metrics-exporter; # added 2022-05-31
|
||||
prometheus-dovecot-exporter = dovecot_exporter; # Added 2024-06-10
|
||||
prometheus-openldap-exporter = throw "'prometheus-openldap-exporter' has been removed from nixpkgs, as it was unmaintained"; # Added 2024-09-01
|
||||
prometheus-openvpn-exporter = throw "'prometheus-openvpn-exporter' has been removed from nixpkgs, as it was broken and unmaintained"; # Added 2023-12-23
|
||||
prometheus-minio-exporter = throw "'prometheus-minio-exporter' has been removed from nixpkgs, use Minio's built-in Prometheus integration instead"; # Added 2024-06-10
|
||||
prometheus-speedtest-exporter = throw "prometheus-speedtest-exporter was removed as unmaintained"; # Added 2023-07-31
|
||||
|
@ -25593,7 +25593,6 @@ with pkgs;
|
||||
prometheus-nginx-exporter = callPackage ../servers/monitoring/prometheus/nginx-exporter.nix { };
|
||||
prometheus-nginxlog-exporter = callPackage ../servers/monitoring/prometheus/nginxlog-exporter.nix { };
|
||||
prometheus-nut-exporter = callPackage ../servers/monitoring/prometheus/nut-exporter.nix { };
|
||||
prometheus-openldap-exporter = callPackage ../servers/monitoring/prometheus/openldap-exporter.nix { } ;
|
||||
prometheus-pgbouncer-exporter = callPackage ../servers/monitoring/prometheus/pgbouncer-exporter.nix { };
|
||||
prometheus-php-fpm-exporter = callPackage ../servers/monitoring/prometheus/php-fpm-exporter.nix { };
|
||||
prometheus-pihole-exporter = callPackage ../servers/monitoring/prometheus/pihole-exporter.nix { };
|
||||
|
Loading…
Reference in New Issue
Block a user