I’m not sure if this is a TrueNAS question or if I should ask this in the FreeBSD and Zabbix forums but here it goes.
I want to monitor TrueNAS via Zabbix but I’m having issues monitoring its UPS.
I have installed the Zabbix server and agent in a jail and I added a host to monitor Truenas via a SNMP agent (there is no zabbix agent in TrueNAS). All this is working properly.
TrueNAS has an UPS connected via USB that is currently configured and monitored by TrueNAS (which uses nut internally).
If I SHH into the jail and run the command
The response I get is the numeric value of the current battery charge of the UPS.
Based on this I want to add items to my Zabbix server host to issue commands that will read the ups parameters on truenas.
But if I try to create an item in my zabbix server that issues the same command, as follows
The result i get is “Permission Denied” and “sh: upsc: not found”
I have already enabled remote command in Zabbix agent by adding the line
to the file “/usr/local/etc/zabbix6/zabbix_agentd.conf”.
It seems as if root has access to the “upsc” command but the user “zabbix” (running the zabbix server and agent) does not.
Can anybody help me with this?
I have successfully done this approach with my PFSense machine so I know it is possible. But I believe PFSense installs the Zabbix agent on baremetal and not in its own jail like I’m doing in TrueNAS.
Help?
I want to monitor TrueNAS via Zabbix but I’m having issues monitoring its UPS.
I have installed the Zabbix server and agent in a jail and I added a host to monitor Truenas via a SNMP agent (there is no zabbix agent in TrueNAS). All this is working properly.
TrueNAS has an UPS connected via USB that is currently configured and monitored by TrueNAS (which uses nut internally).
If I SHH into the jail and run the command
Code:
$UPS_NAME@$TrueNASIP|grep 'battery.charge:' | cut -d ' ' -f 2
The response I get is the numeric value of the current battery charge of the UPS.
Based on this I want to add items to my Zabbix server host to issue commands that will read the ups parameters on truenas.
But if I try to create an item in my zabbix server that issues the same command, as follows
The result i get is “Permission Denied” and “sh: upsc: not found”
I have already enabled remote command in Zabbix agent by adding the line
Code:
AllowKey=system.run[*]
to the file “/usr/local/etc/zabbix6/zabbix_agentd.conf”.
It seems as if root has access to the “upsc” command but the user “zabbix” (running the zabbix server and agent) does not.
Can anybody help me with this?
I have successfully done this approach with my PFSense machine so I know it is possible. But I believe PFSense installs the Zabbix agent on baremetal and not in its own jail like I’m doing in TrueNAS.
Help?