Hello,
i have following problem when im trying to add custom item in zabbix.
I created two custom items:
/etc/zabbix/zabbix_agentd.conf
UserParameter=used,/etc/zabbix/xen-used-space.sh
UserParameter=total,/etc/zabbix/xen-total-space.sh
Permissions for those scripts are (0755/-rwxr-xr-x)
visudo:
zabbix ALL=(root) NOPASSWD: /etc/zabbix/xen-used-space.sh
zabbix ALL=(root) NOPASSWD: /etc/zabbix/xen-total-space.sh
# zabbix_agentd -t total
total [t|136.113]
Error from zabbix server: Item not supported - Timeout while executing a shell script.
When i trying to run those scripts with zabbix user:
# sudo -u zabbix /etc/zabbix/xen-used-space.sh
Authentication failed
For usage run: 'xe help'
Authentication failed
For usage run: 'xe help'
/etc/zabbix/xen-total-space.sh
Any ideas?
i have following problem when im trying to add custom item in zabbix.
I created two custom items:
/etc/zabbix/zabbix_agentd.conf
UserParameter=used,/etc/zabbix/xen-used-space.sh
UserParameter=total,/etc/zabbix/xen-total-space.sh
Permissions for those scripts are (0755/-rwxr-xr-x)
visudo:
zabbix ALL=(root) NOPASSWD: /etc/zabbix/xen-used-space.sh
zabbix ALL=(root) NOPASSWD: /etc/zabbix/xen-total-space.sh
# zabbix_agentd -t total
total [t|136.113]
Error from zabbix server: Item not supported - Timeout while executing a shell script.
When i trying to run those scripts with zabbix user:
# sudo -u zabbix /etc/zabbix/xen-used-space.sh
Authentication failed
For usage run: 'xe help'
Authentication failed
For usage run: 'xe help'
/etc/zabbix/xen-total-space.sh
Code:
#!/bin/bash
used(){
xe sr-param-list uuid=`xe sr-list params=uuid name-label="Local storage" --minimal` | grep physical-size | awk '{print $4}' | awk '{ byte =$1 /1024/1024/1024; print byte }'
}
echo "$(used)"
Comment