Tag: WinSCP

Create Service Groups in Nagios

Create Service Groups in Nagios

Creating service groups in Nagios Core is a pretty easy task. Service Groups allows you to see the status of like services for multiple hosts. If you have numerous hosts or network devices reporting in to Nagios, this is a fantastic feature.

There are a couple of ways to create Service Groups. I find the easiest way is to use WinSCP and Notepad++

The WinSCP and Notepad++ Method

Launch WinSCP and connect to your Nagios machine.

WinSCP will present to you two sides. The Nagios side on the right, and your Windows side on the left. On the left hand side, create a folder called “Nagios_Backup” – You can call this folder whatever you wish. It is purely copying files from Nagios and editing them with Notepad++

Copy the “servicegroup.cfg” from the right hand Nagios folder, to the left hand Windows folder you just created.

On your Windows computer, open up file explorer and navigate to the folder you copied “servicegroup.cfg” to and right click it. Select “Open with Notepad++”

In here you can define your Service Groups. This is a sample config I threw together. You can see any service that you have in Nagios. For me, General_Ping is for miscellaneous devices that I want to see the status of the ping request in Nagios. Network_Ping is where I group all my network devices. CPU_Load shows the CPU Load of various hosts and workstations.

Upon completing your servicegroup.cfg file, you can copy it back to your Nagios server with WinSCP. You will be copying from the left hand side to the right hand side.

Launch Putty and connect to your Nagios server. Issue the command “systemctl restart nagios” and hit enter.

Login to your Nagios web GUI. On the left hand side you will see a list of links. Find the link that says “Service Groups” and click on it.

The link will take you to the Service Groups page within Nagios. You can now see all of your hosts grouped together by service. The screenshot below is of a running Nagios box I have in service.

Permanent link to this article: https://achubbard.com/2018/02/08/create-service-groups-nagios/

Add MIB Files to Ubuntu

Adding MIB files to Ubuntu Manually

This tutorial will cover manually adding MIB, Management Information Base, files to Ubuntu. Specifically, Dell and Ubiquiti MIBs.

You can acquire the Ubiquiti MIBs here:
Ubiquiti MIBs
Ubiquiti UniFi MIBs

Dell Switch MIBs are included within the firmware when you download it from Dell. This process should work for adding just about any MIB to Ubuntu. You can see my post titled “Dell PowerConnect 5524P Firmware Upgrade” to learn how to obtain the Dell firmware.

You will need WinSCP and Putty fohttps://achubbard.com/2018/01/29/dell-powerconnect-5524p-firmware-upgrade/r this tutorial.

Launch WinSCP and navigate to the home directory for the user you logged in as. Within the home directory, right click and create a new folder. I called mine “mibs” to keep things simple. Copy all of your mib files from your computer to this location.

 

Now that the mibs files are located on your Ubuntu server, we need to get them into the correct directory. For this we will use Putty. Open up Putty and connect to your Ubuntu server.

Type the command “sudo cp /home/username/mibs/*.mibs /usr/share/snmp/mibs/”

Where username is, put your account username. So in my case, my command would look like this: sudo cp /home/altach/mibs/*.mibs /usr/share/snmp/mibs/

This will copy all of the files with the .mib file extension to the /usr/share/snmp/mibs/ folder.

 

WGET to manually add MIB files to Ubuntu

Another way to get MIB files on your Ubuntu server is to use the wget command. We will use the Ubiquiti MIBs for this example.

Open Putty and connect to your Ubuntu server. Create and/or navigate to the “tmp” folder. Navigate to it by issuing the command “cd /tmp”

This is where you can now download your Ubiquiti MIB files to.

Type: “sudo wget http://dl.ubnt-ut.com/snmp/UBNT-MIB” and the Ubiquiti MIB file will then be downloaded to your /tmp folder. You can use any folder you wish, I just happend to use a /tmp folder. Issue the command again using the path for the UniFi MIBs if needed.

When the MIBs have been downloaded, you can now copy them to the /usr/share/snmp/mibs/ folder by issuing the command “sudo cp UBNT-* /usr/share/snmp/mibs/

Permanent link to this article: https://achubbard.com/2018/02/08/add-mib-files-ubuntu/