Press "Enter" to skip to content

Category: Tools

Netdisco 2 Service Startup Script Centos/Redhat

I have been trying out the new package of Netdsico 2 from https://metacpan.org/pod/App::Netdisco and I must say im quite impressed by the new version, it has a new interface and its quite smooth to operate. Everything is bundled inside the package and deployed part as of CPAN. Its quite a bit different than Netdisco 1 in terms of installing and configuring, and it is bit easier to work with.

One of the things which I needed was a startup script to start the netdisco-daemon and netdisco-web service on Red Hat / Centos, so I built a custom service to operate it.

Simply download netdisco-web  and netdisco-daemon files , remove the .txt extension, and drop them into /etc/init.d on your redhat/centos system using WinSCP or similar.

Once the files are in there add execute privilege, go into /etc/init.d using terminal

[root@centos init.d]# chmod +x netdisco-daemon 
[root@centos init.d]# chmod +x netdisco-web

Then add the files as part of the startup process

[root@centos init.d]# chkconfig --add netdisco-daemon 
[root@centos init.d]# chkconfig --add netdisco-web 
[root@centos init.d]# chkconfig netdisco-daemon on --level 2345 
[root@centos init.d]# chkconfig netdisco-web on --level 2345

Lets check the startup run levels, looks good

[root@centos init.d]# chkconfig --list | grep netdisco
netdisco-daemon 0:off 1:off 2:on 3:on 4:on 5:on 6:off 
netdisco-web 0:off 1:off 2:on 3:on 4:on 5:on 6:off

 

Now lets check the service

 

[root@centos init.d]# service netdisco-web start Netdisco Web [Started] 
[root@centos init.d]# config watcher: watching /home/netdisco/environments for updates. 
[root@centos init.d]# service netdisco-daemon start Netdisco Daemon [Started]
 config watcher: watching /home/netdisco/environments for updates.

We can see it is working well.

We can then pass the “help” parameter what the service offers

[root@centos init.d]# service netdisco-daemon help Usage: {start|stop|restart|status|help} 
[root@centos init.d]# service netdisco-web help Usage: {start|stop|restart|status|help}

I finally have my netdisco 2 service operational and working well. The bootup scripts have been made so that it allows postgresql to startup first which netdisco relies on, then the daemon and then finally the web.

I haven’t tested on other linux platforms, but i’m sure it will be operational as well with possibly a few tweaks. Hopefully it will assist you too.

Leave a Comment

Adding Juniper CPU/Memory monitoring with WhatsUp Gold

I have had the recent frustration of unable to monitor CPU/Memory on Juniper devices on WhatsUp Gold v15. If I try to add CPU it displays an error like this:

WhatsUp Gold error unable to locate CPU data
WhatsUp Gold error unable to locate CPU data

If I add the memory component to a Juniper device this works, however the memory shows always 100% in use, which it doesnt monitor it properly and looks like this:

juniper_proc

In order to rectify this I had to create custom SNMP Performance counters like these. This was to monitor CPU/Memory on Juniper EX2200 switches however it should work on other range of Juniper devices.

Adding the CPU monitoring:(Configure > Performance Monitor Library in Network Explorer)

 Juniper_CPU_1     juniper_CPU_2

Adding Memory Monitoring:
(Configure > Performance Monitor Library in Network Explorer)

juniper_mem_1  juniper_mem_2

The OID’s Used were

CPU: 1.3.6.1.4.1.2636.3.1.13.1.8, Instance: 9.1.0.0
Memory: 1.3.6.1.4.1.2636.3.1.13.1.11, Instance: 9.1.0.0

Then when I configure a Juniper Device, in WhatsUpGold Network Explorer interface I really want to make sure that “Memory Utilization (Juniper)” and “CPU Utilization (Juniper)” is ticked and the defaults unticked as they will not work since they mostly work with Cisco devices. Example below:

perf_mon_ticks
Ensure your Juniper Custom Performance Monitors are ticked CPU/Memory, and not the defaults

If I go back to my dashboard on the WhatsUp Gold web interface I can select “Add Content +” > Custom Performance Monitors > Top 10 By Specific Monitor or by Threshold. I like to choose the “threshold report” and set it to 70% and only if a device goes over 70% Memory or CPU it will report it on the dashboard for my Juniper Device . As in the image below:

juniper_threshold

Then when I click on my device in the WhatsUp Gold web interface I am able to see statistics from my OIDs Under the “General Tab” and then clicking on “Reports”

juniper_monitors_applied

And Voila..here we see the CPU Utilization..

Juniper_CPU_Graph

BUT what if i had 200 Juniper devices and I wanted to apply Custom Performance Monitors to all of them? It is simply not possible through the “Network Explorer” Interface running the executable on the server. For this we have to apply the custom monitor via the web based interface, and select a bunch of Juniper devices and do a “Bulk Field Change” > “Performance Monitors”  by right clicking on them and then Selecting “All”

bulkchange_perfmon

And thats what there is to it to monitor Juniper CPU/Memory in WhatsUp Gold. I hope this has been useful to some of you out there and if you have any issues please leave a comment, or any other tips!

 

 

Leave a Comment