Skip to content

Commit f9d2f8a

Browse files
committed
wmi_exporter has been renamed to windows_exporter, so update to match
1 parent 77e9fad commit f9d2f8a

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

README.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ the Netbox database. Example:
1919
```
2020

2121
It writes separate files for each type of target: `node_targets.yml`,
22-
`snmp_targets.yml`, `wmi_targets.yml`.
22+
`snmp_targets.yml`, `windows_targets.yml`.
2323

2424
It also generates synthetic metrics which can be used for
2525
[machine role queries](https://www.robustperception.io/how-to-have-labels-for-machine-roles)
@@ -61,7 +61,7 @@ In your Netbox instance:
6161

6262
* Add tag "prometheus" onto each of the site(s) where you have things to to poll (*)
6363
* Add tag "prom_node" to each Linux device/VM that you want to poll
64-
* Add tag "prom_wmi" to each Windows device/VM that you want to poll
64+
* Add tag "prom_windows" to each Windows device/VM that you want to poll
6565
* Add tag "prom_snmp" to each network device that you want to poll
6666
* Ensure that each device or VM that you want to poll has a primary IP
6767
address assigned, and has status "Active"
@@ -70,7 +70,7 @@ Note: the script *requires* all those tags to exist, even if there are no
7070
devices with them, because the Netbox API gives an error if you try to query
7171
non-existent tags.
7272

73-
Therefore if you don't need `prom_wmi` or `prom_snmp`, you still need to
73+
Therefore if you don't need `prom_windows` or `prom_snmp`, you still need to
7474
create an unused tag in Netbox (prior to v2.9.0 you had to add it to a
7575
device then remove it again), or else comment out the relevant lines in the
7676
script.
@@ -178,7 +178,8 @@ Node Exporter:
178178
replacement: '${1}:9100'
179179
```
180180

181-
WMI exporter is similar.
181+
Windows exporter is similar (just change the job_name, the filename, and the
182+
replacement port number to 9182).
182183

183184
SNMP exporter is slightly trickier because the target parameter
184185
cannot contain square brackets around IPv6 addresses.

netbox_prometheus.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ def build(self):
8585
self.add_targets(self.nb.virtualization.virtual_machines.filter(tag="prom_node", **self.filter), "node_targets.yml")
8686
self.add_targets_ctx(self.nb.dcim.devices.filter(tag="prom_snmp", **self.filter), "snmp_targets.yml", "snmp_mibs", "module")
8787
# Not bothering with VMs for SNMP
88-
self.add_targets(self.nb.dcim.devices.filter(tag="prom_wmi", **self.filter), "wmi_targets.yml")
89-
self.add_targets(self.nb.virtualization.virtual_machines.filter(tag="prom_wmi", **self.filter), "wmi_targets.yml")
88+
self.add_targets(self.nb.dcim.devices.filter(tag="prom_windows", **self.filter), "windows_targets.yml")
89+
self.add_targets(self.nb.virtualization.virtual_machines.filter(tag="prom_windows", **self.filter), "windows_targets.yml")
9090
# TODO: blackbox_targets: should this be on Device/VM or on IPAddress object?
9191

9292
def replace_file(self, filename, content):

0 commit comments

Comments
 (0)