UPS - How to best configure

Hello,

I have a UPS which I want ot monitor with nagios. I would like to see it as on the ‘Status Map’ rather than, just being a service of a server. Which/How is the best way to do this?

John :?:

Do you have snmp enabled on the UPS? Is that how you are monitoring it? If so, then you must be able to ping that port on the UPS. If so, just define a host “UPS1” in hosts.cfg and then define services for that device like temp, battery life, etc. whatever you can get from the device. Do a google search for mbrowse and install that tool, to help you query the devices to see what information is available to you, with snmp.

Hello, THe UPS is connected to a ‘server’ via a tty port, using the open source NUT software. More the question is about is a visual appearence, i.e. if I define it as a service, it’s hidden in the server, not obvious that there is a ups connected. I would rather have the ups appearing as a box on the status map, more visable…

john

So in order for you to get data about the UPS, you have to query the host it is attached to right? If so, then just make another entry in the hosts.cfg file and name it “whatever/UPS1” Of course, it will have the same IP as the “server1” but who cares? Then define services for the “ups1”.
All that I would suggest is to make “server1” the parent for the host “ups1” in the hosts.cfg file. That way, you will see a line drawn from ups1 to server1.

Also, by making your parent relationships correctly, if the parent is dead, then nagios will know that “ups1” will be unavailable. So when you look at your status map, it will not show “ups1” as “down”, but “unreachable” and it will show “server1” as “down” which is correct logic, since there is really no way to tell if “ups1” is dead or not. It could in fact, still be powered up and operating just fine, but you have no way of getting info for it, since “server1” is dead.

Thanks, I did wonder about that, was conerned that having two hosts with the same IP would be an issue.

I think it isn’t a problem as long as they don’t have the same services… which is quite obvious. :slight_smile: the computer won’t have a battery status or something like that, and on the other side you don’t have diskspaces or services on the UPS.

Luca

You can have 2 unique “hostnames” and have an identical “service check” for each host. Each “hostname” can even have the same IP#, just as long as the “hostnames” are unique is all that is important.

Same goes for contacts, hostgroups, etc. Only the “xxxname” has to be unique.

I have done a small plugin for our 2 Liebert UPS, which grabs information on the web page and stores performance data in a rrd-database. It also checks for failures. Here is some screenshots: larrys.mine.nu/bilder/nagios/

Hello, that plugin look svery good, have you released the code, I maybe able to modify it for my APC 2200

John

Ofcoz, It’s very simple.

2 similar plugins, because i was in a hurry when i wrote it :wink: There is plenty of RRD wrappers so i don’t release that code. If there is any question send me an email or ask me here.