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:

Screenshot_01 2016-07-26

2 – Check SNMP Services and click Next:

Screenshot_02 2016-07-26.jpg

3 – Confirm installation selections and click Install:

Screenshot_03 2016-07-26.jpgScreenshot_04 2016-07-26.jpg

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

Screenshot_05 2016-07-26

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

Screenshot_06 2016-07-26.jpg

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

Screenshot_07 2016-07-26.jpg

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:

Screenshot_08 2016-07-26.jpg

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

Screenshot_09 2016-07-26.jpg

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

Screenshot_10 2016-07-26.jpg

If the import is successful a message will be displayed.

Screenshot_11 2016-07-26.jpg

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:

Screenshot_12 2016-07-26.jpg

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:

Screenshot_13 2016-07-26.jpg

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!

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s