Closed DeveloperRachit closed 2 years ago
Please provide more details and your steps to reproduce?
which Zabbix version do you use (when I last touch this project 4.x didn't release yet)?
could you describe or attach your items configuration?
also, do you have mtr
binary on your host where you run zabbix-agent
?
i am using zabbix 3.4 version yes i have mtr binary also
sudo -H -u zabbix /opt/zabbix-mtr-ping/zabbix-mtr.sh -n -c 3 8.8.8.8
works on your on host where installed zabbix-agent?
yes this is working fine
but when using it with conf file that is not working give me error
what do you mean "using it with conf file" ? could export and paste here your zabbix mtr items in XML format? and could you output results of following command which need run on host where installed zabbix-server
zabbix-get zabbix_mtr[-n -c 3 --tcp --port 443,s3.eu-west-1.amazonaws.com]
?
could you run and past here resulst on zabbix-agent host following commands?
cat /etc/zabbix/zabbix_agent.conf
cat /etc/zabbix/zabbix_agentd.conf.d/zabbix_mtr_ping.conf
i have zabbix-agent
PidFile=/var/run/zabbix/zabbix_agentd.pid
LogFile=/var/log/zabbix/zabbix_agentd.log LogFileSize=0 DebugLevel=5 Server=103.89.136.31 StartAgents=10 ServerActive=127.0.0.1 Hostname=Zabbix server Timeout=30 Include=/etc/zabbix/zabbix_agentd.d/*.conf
in $1 will get ip and then this will execute UserParameter=recaster.mtr[*],sudo -H -u zabbix /opt/zabbix-mtr-ping/zabbix_mtr.sh -n -c 3 $1
please look https://github.com/Slach/zabbix-mtr-ping/blob/master/UserParams.conf there is expected content on zabbix_mtr_ping.conf
if i would use it as like in config that would also work na but this is not updating zabbix UserParameter=recaster.mtr[*],sudo -H -u zabbix /opt/zabbix-mtr-ping/zabbix_mtr.sh -n -c 3 $1
what you mean when said, "this is not updating zabbix"? do you mean "data for items didn't update in zabbix" ?
UserParameter config which you use expect you will use only one bash parameter $1 like hostname?
could you export XML files which describe your currently used Zabbix items? did you run zabbix-get?
yes but script executing fine but data is not updating in zabbix
could you export XML files which describe your currently used Zabbix items? did you run zabbix-get?
no i didn't
ok. please export items which you currently try used in XML format from Zabbix Server UI and attach it to this issue
okay i have your files inside /opt/ and then i just created new template mtr in zabbiz GUI and then i given key to that recaster.mtr before that i created a dicovery that will return ip to which i have to get mtr ping then inside conf file i did entry as like UserParameter=recaster.mtr.discovery,sudo /var/lib/zabbix/discovery.py UserParameter=recaster.mtr[*],sudo -H -u zabbix /opt/zabbix-mtr-ping/zabbix_mtr.sh -n -c 3 $1
how look your recaster items in Templates
and in Hosts
on Zabbix server UI? could you export it via press button "export" in UI?
now it's time limit exceeding
this comment https://github.com/Slach/zabbix-mtr-ping/issues/1#issuecomment-572536211
doesn't contains anything look like recaster.mtr
could you attach XML file as is use GitHub attachment form look like
close after inactivity
when i am executing my script error is getting "Timeout while executing a shell script." even i set Timeout 30 after that i am also getting that error