diff --git a/flake.lock b/flake.lock index 9c00f93..8c1f5c5 100644 --- a/flake.lock +++ b/flake.lock @@ -60,15 +60,16 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1710311999, - "narHash": "sha256-s0pT1NyrMgeolUojXXcnXQDymN7m80GTF7itCv0ZH20=", + "lastModified": 1717234745, + "narHash": "sha256-MFyKRdw4WQD6V3vRGbP6MYbtJhZp712zwzjW6YiOBYM=", "owner": "dali99", "repo": "nixos-matrix-modules", - "rev": "6c9b67974b839740e2a738958512c7a704481157", + "rev": "d7dc42c9bbb155c5e4aa2f0985d0df75ce978456", "type": "github" }, "original": { "owner": "dali99", + "ref": "v0.6.0", "repo": "nixos-matrix-modules", "type": "github" } diff --git a/flake.nix b/flake.nix index 7e58a78..260a6ae 100644 --- a/flake.nix +++ b/flake.nix @@ -11,7 +11,7 @@ home-manager.url = "github:nix-community/home-manager/release-24.05"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; - matrix-synapse-next.url = "github:dali99/nixos-matrix-modules"; + matrix-synapse-next.url = "github:dali99/nixos-matrix-modules/v0.6.0"; nix-minecraft.url = "github:Infinidoge/nix-minecraft"; # voyager-addons.url = "git+ssh://git@git.feal.no:2222/felixalb/voyager-addons.git"; diff --git a/hosts/defiant/services/monitoring/loki.nix b/hosts/defiant/services/monitoring/loki.nix index 1c4b283..36a1226 100644 --- a/hosts/defiant/services/monitoring/loki.nix +++ b/hosts/defiant/services/monitoring/loki.nix @@ -51,7 +51,6 @@ in { boltdb_shipper = { active_index_directory = "${saveDirectory}/boltdb-shipper-index"; cache_location = "${saveDirectory}/boltdb-shipper-cache"; - shared_store = "filesystem"; cache_ttl = "24h"; }; filesystem = { @@ -60,14 +59,13 @@ in { }; limits_config = { - enforce_metric_name = false; + allow_structured_metadata = false; reject_old_samples = true; reject_old_samples_max_age = "72h"; }; compactor = { working_directory = "${saveDirectory}/compactor"; - shared_store = "filesystem"; }; }; }; diff --git a/hosts/defiant/services/monitoring/snmp-exporter.nix b/hosts/defiant/services/monitoring/snmp-exporter.nix index 19beea3..7012007 100644 --- a/hosts/defiant/services/monitoring/snmp-exporter.nix +++ b/hosts/defiant/services/monitoring/snmp-exporter.nix @@ -1,20 +1,9 @@ { config, pkgs, ... }: { - environment.systemPackages = [ - pkgs.prometheus-snmp-exporter - ]; - - systemd.services.prometheus-snmp-exporter = { + services.prometheus.exporters.snmp = { enable = true; - description = "Gather data from SNMP devices and expose them as Prometheus metrics"; - unitConfig = { - Type = "simple"; - }; - serviceConfig = { - ExecStart = "${pkgs.prometheus-snmp-exporter}/bin/snmp_exporter --config.file='/tank/services/metrics/prometheus/snmp.yml'"; - # snmp.yml = https://github.com/prometheus/snmp_exporter/blob/main/snmp.yml + https://global.download.synology.com/download/Document/Software/DeveloperGuide/Firmware/DSM/All/enu/Synology_DiskStation_MIB_Guide.pdf - }; - wantedBy = [ "multi-user.target" ]; + configurationPath = "/tank/services/metrics/prometheus/snmp.yml"; + # snmp.yml = https://github.com/prometheus/snmp_exporter/blob/main/snmp.yml + https://global.download.synology.com/download/Document/Software/DeveloperGuide/Firmware/DSM/All/enu/Synology_DiskStation_MIB_Guide.pdf }; }