[SOLVED!] UPS Monitoring without SNMP (apcupsd > zabbix) - Need some help
So I looked around and I haven't found an answer, but I did see some advanced applications for unsupported methods. They all involve putting the data into a file that Zabbix can read.
Here is the data as dumped by apcupsd every 5 seconds: Code:
APC : 001,038,0994 So if anyone knows what format this data needs to be converted to - and how to do it, I can get it going from there. Thanks! |
Quote:
Looks like we're UPS buddies! I love that series of APC product. I'm running the upsaccess command contained within apcupsd-3.14.0-3.el5. I'm assuming you're using something similar. So is it just that you want to take that output and send yourself a regular e-mail with the specific numbers, or do you need to have those numbers monitored for high and low values? You mentioned Zabbix, so I'm assuming you want these values monitored and reported when found to be outside of ranges, correct? |
I totally forgot I had posted here!
forgot exactly what settings I did for the apcupsd, but it overwrites the file and in my agentd conf I have something like this.. Code:
UserParameter=UPSLine,awk < /var/log/apcupsd.status '/^(LINEV).*:/ { print $3 }' Working very well! Took me a while to figure out how it all worked, but it was well worth the effort. As you see I was having some issues and I wanted to get some proof. |
Ah, excellent! Glad you got it working.
I may try this out, because it's nice to be able to report with hard facts. I haven't asked a question here yet, so I don't know how to mark things "Solved" but you might want to do that so it falls off The List (if there is one) of unanswered questions. I was just going through the Zero Reply Threads looking for things I've worked on before. I love APC UPS monitoring on Linux! |
good call, I always forget that. very OT, but my issue was my neutral wire at the pole, only had about 15% of the original conductivity. It was a big mess, you can't see on the graph, but we had a spike of 145V and that blew out a surge suppressor and started a fire! We were home and I had recently purchased an extinguisher so the damage was minimal.
On an on-topic note, this same method can be applied to many things that can report data in a similar method. I can't think of any, but I can imagine simple serial devices like environmental sensors and such would be a possibility |
Needing some help, I have Zabbix working perfectly, and I have apcupsd working great too.
Can you post specifics how you got it working? like what options you added and what steps you took. That would greatly help Thanks Steven |
Steven:
You shouldn't reply to old threads, but start a new one. Here's how this works: On the zabbix target that runs zabbix_agentd, edit the /etc/zabbix/zabbix_agentd.conf and insert these lines: Code:
UserParameter=UPSLine,awk < /var/log/apcupsd.status '/^(LINEV).*:/ { print $3 }' In the zabbix web interface for the same host, you'll create 3 new items with the following key values. (Do not use the Select button, they may not be there) Enter these items manually. Code:
UPSLine Code:
UserParameter=mysql.slave.status,mysql -e "show slave status\G;" | grep Slave_SQL_Running | awk '{print $2}' The actual command-line command being hightlighted in Bold Red. NOTE: The first example from the OP should work for a UPS, but can be used for other custom Items for a given host. https://www.zabbix.com/documentation...ser_parameters https://www.zabbix.com/documentation...l/config/items I hope that's clear. HTH. |
All times are GMT -5. The time now is 07:32 AM. |