File tree 3 files changed +38
-0
lines changed
3 files changed +38
-0
lines changed Original file line number Diff line number Diff line change 2
2
imports = [
3
3
./configuration.nix
4
4
../../modules/obs/sflow_exporter.nix
5
+ ../../modules/obs/snmp_exporter.nix
5
6
] ;
6
7
}
Original file line number Diff line number Diff line change 103
103
] ;
104
104
} ] ;
105
105
}
106
+ {
107
+ job_name = "snmp" ;
108
+ metrics_path = "/snmp" ;
109
+ params = {
110
+ module = [ "arista_sw" ] ;
111
+ } ;
112
+ relabel_configs = [
113
+ {
114
+ "source_labels" = [ "__address__" ] ;
115
+ "target_label" = "__param_target" ;
116
+ }
117
+ {
118
+ "source_labels" = [ "__param_target" ] ;
119
+ "target_label" = "instance" ;
120
+ }
121
+ {
122
+ "target_label" = "__address__" ;
123
+ "replacement" = "svc-exp01.dd-ix.net:9116" ;
124
+ }
125
+ ] ;
126
+ static_configs = [ {
127
+ targets = [
128
+ "ixp-c2-sw01.dd-ix.net"
129
+ "ixp-cc-sw01.dd-ix.net"
130
+ ] ;
131
+ } ] ;
132
+ }
106
133
] ;
107
134
} ;
108
135
Original file line number Diff line number Diff line change
1
+ {
2
+ services . prometheus . exporters . snmp = {
3
+ enable = true ;
4
+ configurationPath = builtins . fetchurl {
5
+ url = "https://raw.githubusercontent.com/prometheus/snmp_exporter/main/snmp.yml" ;
6
+ sha256 = "sha256:16w3zgi8dgwx72a47y8qywxg6dfs0p032v233m8vrn2f5biy5n25" ;
7
+ } ;
8
+ openFirewall = true ;
9
+ } ;
10
+ }
You can’t perform that action at this time.
0 commit comments