Getting alerts from remote Icinga/Nagios instance

icingamonitoringnagiosnetwork-monitoring

I have an Icinga server (which is basically a fork of Nagios) at one of my clients' sites. I access the server via ssh and don't have access to other ports.

Since there are a couple of things that can go down at that site, I prefer to check the site at least on a daily basis. So I run the following command:

ssh -L 8080:localhost:80 user@remote.host

and check the Icinga web UI with my browser at:

http://localhost:8080

Pretty standard.

The problem is, that if I had more clients like this, ssh-ing into each of those servers would be a painful experience. The most welcome solution would be to configure mail alerts on those hosts, unfortunately those machines don't have internet access and the ssh I'm accessing them through is the only contact with them.

Is there some way to gather info from those instances via ssh? Let's say Icinga dumps current alerts into a file and I scp that file to my local instance? Or any other solution?

I'd really appreciate to be able to come to work and see any alerts in some place (local dashboard, mail, whatever).

EDIT The remote site should have its own Icinga setup, so anyone inside that network can check alerts in it. Additionally I'd like to have a local instance at my place, that would aggregate those remote instances and show only alerts from them. That way I could perhaps configure it to send email on alerts (sent from my local Icinga instance)

Best Answer

For starters you can designate each site with a particular port 8080, 8081, etc. and then use something like autossh to maintain the connections. Then you'd be connected and would just need to go from 8080 to 8081 check each site that you've mapped to a designed local port.

This type of approach could be scaled up so that instead of you looking at each sites' local port, you could have a script do the checking instead. Depending on what's on each site' Icinga site, you could periodically check it with your own Nagios/Icinga site that's been configured to check for the various things you've been checking for manually.

It's really hard to provide more info without more specifics.

Related Topic