Slach / zabbix-mtr-ping

Zabbix ping remote hosts over mtr
13 stars 10 forks source link

Timeout while executing a shell script. #1

Closed DeveloperRachit closed 2 years ago

DeveloperRachit commented 4 years ago

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

Slach commented 4 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?

DeveloperRachit commented 4 years ago

i am using zabbix 3.4 version yes i have mtr binary also

Slach commented 4 years ago
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?

DeveloperRachit commented 4 years ago

yes this is working fine

DeveloperRachit commented 4 years ago

but when using it with conf file that is not working give me error

Slach commented 4 years ago

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]

?

Slach commented 4 years ago

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
DeveloperRachit commented 4 years ago

i have zabbix-agent

DeveloperRachit commented 4 years ago

cat /etc/zabbix/zabbix_agent.conf

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

DeveloperRachit commented 4 years ago

cat /etc/zabbix/zabbix_agentd.conf.d/zabbix_mtr_ping.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

Slach commented 4 years ago

please look https://github.com/Slach/zabbix-mtr-ping/blob/master/UserParams.conf there is expected content on zabbix_mtr_ping.conf

DeveloperRachit commented 4 years ago

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

Slach commented 4 years ago

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?

DeveloperRachit commented 4 years ago

yes but script executing fine but data is not updating in zabbix

Slach commented 4 years ago

could you export XML files which describe your currently used Zabbix items? did you run zabbix-get?

DeveloperRachit commented 4 years ago

no i didn't

Slach commented 4 years ago

ok. please export items which you currently try used in XML format from Zabbix Server UI and attach it to this issue

DeveloperRachit commented 4 years ago

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

Slach commented 4 years ago

how look your recaster items in Templates and in Hosts on Zabbix server UI? could you export it via press button "export" in UI?

DeveloperRachit commented 4 years ago

now it's time limit exceeding

Slach commented 4 years ago

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 image

Slach commented 2 years ago

close after inactivity