Ad Widget

Collapse

UPS - Pfsense -Agent - Zabbix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • spazio
    Junior Member
    • May 2014
    • 3

    #1

    UPS - Pfsense -Agent - Zabbix

    Hi All!

    I'm stuck here, any help would be appreciated.

    Here is the setup:
    I have
    - zabbix 2.0 server ( working fine, monitoring multiple servers)
    - Pfsense router 2.0.1 (Again working fine and it's monitored by the zabbix server with the pfsense agent package included zabbix2-agent-2.2.2_1 pkg v0.8_2 with standard config. I just added the different variables.
    - APC Smart UPS that is connected to the Pfsense machine with the "proprietary" serial cable. It's monitored in the Pfsense with the NUT package
    Installed: 2.6.5_1 pkg 2.0 Again, working ok. I can see all info, load, voltage, battery etc.

    Challenge: I want to have zabbix monitor the UPS on the Pfsense machine.

    For that there is is this template:
    Zabbix Template for NUT(Network UPS Tools). Contribute to delin/Zabbix-NUT-Template development by creating an account on GitHub.

    Which is listed on the official zabbix template:
    Join the friendly and open Zabbix community on our forums and social media platforms.

    under Network UPS Tools.

    So I did the following:

    imported the XML template in zabbix server. - ok
    added in the pfsense agent page - UserParameter=upsmon[*],/etc/zabbix/sh/ups_status.sh $1 $2 - ok
    Created the script /etc/zabbix/sh/ups_status.sh and chmod ug+x - ok
    With this modification, /bin/upsc to /usr/local/bin/upsc to adapt to freebsd since I think the script was written for linux. - ok
    Tested the script with /etc/zabbix/sh/ups_status.sh apc@localhost without any returned error.

    Problem:
    In zabbix server, on the host config, item section, I get "not supported" under the status of all the UPS variables.

    I think is the User parameters key variables. I just don't know where to begin to troubleshoot this. Thanks for any ideas!

    Spazio
  • spazio
    Junior Member
    • May 2014
    • 3

    #2
    Solved

    After multiple tries and error I made it work.

    Looks like the template has to be added last on the host on the zabbix server. If the template record a not supported from the agent it doesn't retry after!
    So I had to delete the template on the host configuration and save the host. After I added the template after the script was running on the agent and VOILA!

    Everything work!

    Comment

    Working...