Tag: Putty

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/

Dell PowerConnect 5524P Firmware Upgrade

Dell PowerConnect 5524P Firmware Upgrade

Background

Upgrading the firmware on a Dell PowerConnect 5524p switch is a fairly simple task. For this tutorial, we are going to assume that you already have console and web access to the switch.

 

You can download the 5524’s firmware from Dell’s webpage located here: Dell Support

Steps to take

Login to the switch’s web interface.

Navigate to System > File Management > File Download.

In the “Download Protocol” section of the page, select “Download via HTTP” – This is where it is a little confusing because you are actually uploading the firmware to the switch.

Software Image Upload

Within the “Firmware Download” section, you should now see a “Browse” button. You can click this and navigate to the location you have stored your Dell firmware. There are two files to this procedure. The first one is the “Software Image” or the .ros file. Select the .ros file, hit the “Open” button on the dialogue box, then click “Activate” on the browser window.

Once the .ros file has completed it’s upload, you will see the following screen:

Click close and refresh the page. *NOTE* If you try and upload the second file without refreshing the page first, you may see a error stating “Invalid Image” or “Invalid File Type” – I ran into this on 2 separate 5524p switches that I have updated recently.

After refreshing the page, re-navigate to System > File Management > File Download. Re-select “Download via HTTP”

Boot Code Upload

In the “Firmware Download” section, click the drop down for “Destination File Type” and change it to “Boot Code” – This is the .rfb file we will be uploading. Then click on the browse button, navigate to where you have stored your Dell firmware files and select the .rfb file. Click “Open” on the dialogue box, then click “Activate” on the browser window.

You will see a box that says “Copy Finished” – Click Close

Navigate to System > File Management > Active Images. Here we will select which image to use after a reboot. This will display the current image being used by the system. Under the “After Reset” drop down, select the image which you just uploaded. Click on the “Apply” button.

Once you click “Apply” a green box will appear that says “Success” 

If you are in the console of the switch that you can issue the “Reload” command to reboot the switch.

Upon reboot, you can issue the command “show version” and see that the switch is using the new firmware version.

I hope this helped you out, thank you for reading my first blog post! Check out my links page for some awesome resources

Permanent link to this article: https://achubbard.com/2018/01/29/dell-powerconnect-5524p-firmware-upgrade/