Tag Archives: bash scripts

Using Nagios in a efficient way (in a generic install):

Nagios is a highly configurable monitoring platform. Basically it gives you the possibility to take any output and can monitor it!

It has a great community around it; it’s very well documented and has many, many plug-ins.

There is a free and a paid version available:

  • The Core version gives you the possibility to make the installation in any way you want, but requires some knowledge on how you can get the things done.
  • The paid version (current named Nagios XI) try’s to include a unified interface where the user can administrate the whole Nagios server in one interface.

Continue reading

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:

DMZ_INTERFACE=”eth0″               #we should have an IP address on this network –
LAN_INTERFACE_1=”eth1″          #we should have an IP address on this network –
EXTIPADDR=”″     #an dmz gateway
INTIPADDR=”″           #all the internal traffic

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