userparameters and ZBX_NOTSUPPORTED
zabbix userparameter timeout
I want to ping an external ip from all of my servers that run zabbix agent.
I searched and find some articles about zabbix user parameters.
/etc/zabbix/zabbix_agentd.conf.d/ I created a file named
userparameter_ping.conf with following content:
UserParameter=checkip[*],ping -c4 126.96.36.199 && echo 0 || echo 1
I created an item named
checkip in zabbix server with a graph but got no data. After some another digging I found
zabbix_get and tested my userparameter but I got the error :
# zabbix_get -s 172.20.4.43 -p 10050 -k checkip
my zabbix version :
Zabbix Agent (daemon) v2.4.5 (revision 53282) (21 April 2015)
Does anybody know what I can do to address this?
After some change and talks with folks in mailing list finally it worked but how :
first i created a file in :
and add this line :
UserParameter=checkip[*],ping -W1 -c2 $1 >/dev/null 2>&1 && echo 0 || echo 1
and run this command :
./sbin/zabbix_agentd -t checkip["188.8.131.52"] checkip[184.108.40.206] [t|0]
so everything done but Timeout option is very important for us :
add time out in /etc/zabbix/zabbix_agentd.conf
Timeout default is 3s so if we run
time ping -W1 -c2 220.127.116.11
see maybe it takes more than 3s so you got error :
ZBX_NOTSUPPORTED UserParameter, 8, UserParameter not worked anymore. It shows ZBX_NOTSUPPORTED after exec zabbix_get. In client, we see this message: 1459:20131002: When I run zabbix_get -s <host> -k x.sensor[Core 0] from the agent host I get a blank value back, when I run it from the server I get ZBX_NOTSUPPORTED. What am I missing Thanks much for any help! I really appreciate it.
It can be anything. For example timeout - default timeout is 3 sec and ping -c4 requires at least 3 seconds, permission/path to ping, not restarted agent, ...
Increase debug level, restart agent and check zabbix logs. Also you can test zabbix_agentd directly:
zabbix_agentd -t checkip
[m|ZBX_NOTSUPPORTED] [Timeout while executing a shell script.] => Timeout problem. Edit zabbix_agentd.conf and increase Timeout settings. Default 3 seconds are not the best for your ping, which needs 3+ seconds.
Zabbix / Re: [Zabbix-users] define userparameter and got , Subject: [Zabbix-users] define userparameter and got ZBX_NOTSUPPORTED Hello i want to ping an external ip from all of my servers that running zabbix agent. ALL UserParameters come back ZBX_NOTSUPPORTED in my compile of 2.0.4. Log In. Export. XML Word Printable. Details. Type: Incident report Status: Closed.
If you need more than 30s for the execution, you can use the
nohup (command..) & combo to curb the timeout restriction.
That way, if you generate some file with the results, in the next pass, you can read the file and get back the results without any need to wait at all.
userparameters and ZBX_NOTSUPPORTED, After some another digging I found zabbix_get and tested my userparameter but I got the error : ZBX_NOTSUPPORTED # zabbix_get -s 172.20.4.43 -p 10050 -k Powershell Userparameter ZBX_NOTSUPPORTED. Log In. Export. XML Word Printable. ["1"] I get the following result: veeam.test  [m|ZBX_NOTSUPPORTED] What causes
I defined two user parameters like this for sync checking between to samba DCs.
UserParameter=syncma, sudo samba-tool drs replicate smb1 smb2 cn=schema,cn=configuration,dc=domain,dc=com UserParameter=syncam, sudo samba-tool drs replicate smb2 smb1 cn=schema,cn=configuration,dc=domain,dc=com
and also provided sudoer access for Zabbix user to execute the command. /etc/sudoers.d/zabbix:
Defaults:zabbix !syslog Defaults:zabbix !requiretty zabbix ALL=(ALL) NOPASSWD: /usr/bin/samba-tool zabbix ALL=(ALL) NOPASSWD: /usr/bin/systemctl
And "EnableRemoteCommands" is enabled on my zabbix_aganetd.conf, sometimes when I run
zabbix_get -s CLIENT_IP -p10050 -k syncma or
zabbix_get -s CLIENT_IP -p10050 -k syncam
I get the error
ZBX_NOTSUPPORTED: Timeout while executing a shell script.
but after executing
/sbin/zabbix_agentd -t syncam on the client, Zabbix server just responses normally.
Replicate from smb2 to smb1 was successful.
and when it has a problem I get below error on my zabbix.log
failed to kill [ sudo samba-tool drs replicate smb1 smb2 cn=schema,cn=configuration,dc=domain,dc=com]:  Operation not permitted
It seems like it is a permission error! but It just resolved after executing
/sbin/zabbix_agentd -t syncam but I am not sure the error is gone permanently or will happen at the next Zabbix item check interval.
Create your own items – extend the agent with userparameters , Zabbix userparameters are commands that the agent runs and expects be returned – at best, ZBX_NOTSUPPORTED string can be returned, User parameters that return text (character, log, text types of information) now can return whitespace only as well, setting the return value to an empty string (supported since 2.0). If non-valid value is returned, ZBX_NOTSUPPORTED will be sent back by the agent.
ZBX_NOTSUPPORTED: Unsupported item key. · Issue #16 · grundic , But when i tried to test the command " zabbix_get -s 127.0.0.1 -k "custom.vfs.discover_disks"", i got ZBX_NOTSUPPORTED: Unsup Arash, Did you include your file /etc/zabbix/zabbix_agentd.conf.d/userparameter_ping.conf into the main configuration file /etc/zabbix/zabbix_agentd.conf With the
userparameters и ZBX_NOTSUPPORTED, userparameters и ZBX_NOTSUPPORTED. Я хочу пинговать внешний UserParameter=checkip[*],ping -c4 18.104.22.168 && echo 0 || echo 1. Я создал элемент с UserParameter ZBX_NOTSUPPORTED: 0 30-08-2017, 17:02 В 3.2 на виндовом сервере в конфе агента опрашивались UserParameter, как написано в документации.
Zabbix Network Monitoring, with zabbix_agentd -t or -p, I get an error [m|ZBX_NOTSUPPORTED] [Collector is The following list details queries related to user parameters: • Q: My user Every UserParameter defined in the agentd configuration file return ZBX_NOTSUPPORTED. i have tested with: UserParameter=test,echo 1. and zabbix_agentd.exe -t test
- [m|ZBX_NOTSUPPORTED] [Timeout while executing a shell script.]
- i checked timeout / ping permissions and restart agent again but error still exist
- for "ZBX_NOTSUPPORTED: Timeout while executing a shell script" you should check Timeout directive in /etc/zabbix/zabbix_agentd.conf, maybe for a moment your command taking a bit longer time to execute. I think thats why sometimes its ok and sometimes you will see error