Windows DHCP Server scopes discovery (SNMP) with Zabbix 3.0

portuguese version here

Hello!

With the latest Zabbix 3.0 version it’s easier to create LLD discovery rules.

Using SNMP with Zabbix features, it’s possible to collect interesting data from your Windows DHCP Server.

In the template described below, the data collected will show you how many IP addresses are available for use in each scope configured in your server.

It’s required that SNMP is enabled in your Windows server. To achieve so, do the following steps:

1 — Go to Server Manager console, click in Features and then Add Features:

2 — Check SNMP Services and click Next:

3 — Confirm installation selections and click Install:

4 — After the feature is installed, go to Services console (services.msc), look for SNMP Service and open it’s properties.

5 — Go to Security tab, you’ll need to add a community name and which hosts will collect data:

6 — For Zabbix purposes, only read rights are required.

Note: if your server is in a non-controlled environment (DMZ), set a community name that’ll be safe from dictionary attacks.

7 — Add the IP of your Zabbix Server or Proxy:

8 — If you want to test it, run a snmpwalk from your server to check if data is being collected accordingly:

snmpwalk -v2c -c communityname WindoesServerIP SNMPv2-SMI::enterprises.311.1.3.2.1.1.1

9 — Download your template file.

In Zabbix frontend, go to Configuration -> Templates and click Import

10 — Choose the template file by clicking Browse and then click Import

If the import is successful a message will be displayed.

Don’t forget to change the community name in your template! It has to be the same as configured in your Windows Server!

11 — The next step is to apply it to the host you want to monitor. To do it, go to Configuration -> Hosts and select the targeted host.

12 — In Templates tab, type the name of the new template, click Add and then click Update:

13 — You can enforce the configuration cache reload by issuing the following command in Zabbix server:

zabbix_server -R config_cache_reload

All set! Check the collected data in Latest Data:

Within this template, there’s a trigger that will warn you if there’re less than 5 free IP addresses in the scope, you can adjust it based in your needs.

If you have any suggestions or doubts feel free to leave a comment!

Originally published at bughappens.wordpress.com on July 27, 2016.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.