Category Archives: Linux

Small routing script

In recent days I was confronted with a problem regarding the routing under Linux.

The request was to add a route on a Proxy ARP server.

The Linux OS does give you the possibility to do add a route, in an “automatic mode”, in ways like:

  • add a route on the interface configuration (it will be applied only when the interface will go on-line) – for example Ubuntu and SUSE Linux
  • add a route on the network start script
  • add a route in the static-routes file
  • add a route with a script on the ifup folder on the “/sbin/ifup” (here more details: http://www.comptechdoc.org/os/linux/howlinuxworks/linux_hlsysconfig.html)

But because this was a complicated setup I was forced to use a bash script under the “/sbin/ifup”.

The script looked like this:

#!/bin/sh
ROUTE_CMD=”/sbin/route”
DMZ_INTERFACE=”eth0″               #we should have an IP address on this network – 85.14.228.0/24
LAN_INTERFACE_1=”eth1″          #we should have an IP address on this network – 10.12.0.0/24
EXTIPADDR=”85.14.228.254″     #an dmz gateway
INTIPADDR=”10.12.0.254″           #all the internal traffic

$ROUTE_CMD add -host 85.14.228.248 gw $EXTIPADDR $DMZ_INTERFACE
$ROUTE_CMD add default gw $INTIPADDR $LAN_INTERFACE_1
exit 0

I hope that this is going to help you,

Mihai out!

Monitoring Keepalived with Nagios

This is one of the cases where the passive check of the Nagios monitoring system comes in handy as we need to be informed immediately when the Keepalived changes state. So you will need an NSCA system implemented with your Nagios configuration.

Studying the Keepalived configuration we found that the authors have implemented the option to run a script that when the state of the VRRP changes. The script I’m referring to is run under the “notify” option.

Continue reading

I know what “I” did last summer!

Having a little time off from the day to day responsibilities I usually have at my work place, last summer I decided to build the map of Italy with all the offices, for our Help Desk.

So, with the magic of Wikipedia (http://en.wikipedia.org/wiki/Italy), Gimp and Mk-livestatus I have done in NagVis, a dashboard that displays live checks of the network and server software. This map is displayed on a TV in the Help Desk room, so that everyone can see the network status. Continue reading

Microsoft launches a self computing guide

Yep! It finally strike them that it does not matter how safe you make a system (not that Windows is the safest system around – but it’s over Apple for example http://news.softpedia.com/news/Macs-Are-Probably-Easier-to-Hack-than-Windows-PCs-Notorious-Hacker-Says-155507.shtml ) the human that uses the system will finally have the final word!

Continue reading

Icinga VS Nagios – the matrix:

At almost a year after the version RC 1.0 and after three months from the first comparison (the YouTube film http://www.icinga.org/2010/05/25/youtube-icinga-vs-nagios-whats-the-difference/) the Icinga team added a new table which compares the two versions of “Nagios”. You can download it from here: http://www.icinga.org/wp-content/uploads/2010/08/Icinga-vs-Nagios-matrix1.pdf

Also be sure you checked out the web demo http://web.demo.icinga.org/icinga-web/ and the Nagios-portal, a forum for the Icinga \ Nagios administrator http://www.nagios-portal.org/wbb/index.php .

Mihai out.

Nagios check_snmp INVERTER

This is my first plug-in made for Nagios. It was made in order to help the administrator to check via SNMP the inverse scale variables such as UPS line in voltage.

For example, one needs to know when the input voltage of an UPS drops to zero => an error, as the power line is in fault, but not having problems when the same check is 220V in normal conditions.

With the normal “check_snmp” you can’t check those limits, as the check will always be in error.

Usage:  ./check_snmp_inverter.sh -H <remote_host_IP> -C <comunity_string> -o <OID> -w <warning value> -c <critical value> -u <measure block> -l <label>

The critical value is the real value that one needs to set, for example: 0, and the warning value greater than the critical – ex: 240.

You can download it from here.

Nagios WMI Proxy

This is a sketch article in which I want to do a brief description of how to install a Windows WMI proxy and do the checks via WMI in your windows network.

The WMI Proxy is basically a Windows Server / Workstation that has NRPE_NT or NSClient++ (you need to change a bit the configurations) installed and from which with an administrative user can do checks to the windows network via the WMI.

WMI is also used as a check for some other products including but not limited to: SCCM, SCOM, Spiceworks, etc.

Continue reading