snmptt status and actions
-
murawweh.daher
- Posts: 66
- Joined: Wed Sep 02, 2015 2:02 pm
- Location: Ramallah - West Bank
- Contact:
snmptt status and actions
Hi All,
i did upgrade today to Nagios from 2014R2.7 to latest 5.2.1.
i tried to test restart all services (nagios, snmptt, snmptrap, mysql) and i see the below for snmptt.
your advice please.
/etc/init.d/snmptt stop
Stopping snmptt: [FAILED]
/etc/init.d/snmptt status
snmptt is stopped
i did upgrade today to Nagios from 2014R2.7 to latest 5.2.1.
i tried to test restart all services (nagios, snmptt, snmptrap, mysql) and i see the below for snmptt.
your advice please.
/etc/init.d/snmptt stop
Stopping snmptt: [FAILED]
/etc/init.d/snmptt status
snmptt is stopped
Regards,
Murawweh Daher
Murawweh Daher
Re: snmptt status and actions
Can you try to start it and see what happens? If you tried to stop it when it wasn't running, it'll do that.
Former Nagios Employee.
me.
me.
-
murawweh.daher
- Posts: 66
- Joined: Wed Sep 02, 2015 2:02 pm
- Location: Ramallah - West Bank
- Contact:
Re: snmptt status and actions
When i start it it working fine first attempt
When i run service stop, it stop from first or second time.
When i run service stop, it stop from first or second time.
Regards,
Murawweh Daher
Murawweh Daher
Re: snmptt status and actions
Can you post the output of what happens when you try to stop the service?
Former Nagios Employee.
me.
me.
Re: snmptt status and actions
I've seen this as well. As I recall it was found that changing the SNMP config win Nagios caused SNMPTT to need a restart. The solution (offered by support I think) was to restart SNMPTT when a reconfig was run. This was done by adding the restart at the end of the start section of the Nagios init script just before the done line.
# grep -i snmptt /etc/init.d/nagios
/etc/init.d/snmptt restart
# grep -i snmptt /etc/init.d/nagios
/etc/init.d/snmptt restart
Re: snmptt status and actions
Thanks @gormank! Let us know if this works for you.
Former Nagios Employee
-
murawweh.daher
- Posts: 66
- Joined: Wed Sep 02, 2015 2:02 pm
- Location: Ramallah - West Bank
- Contact:
Re: snmptt status and actions
Thanx gormank, restart by using (/etc/init.d/snmptt restart) working fine.
no output for (# grep -i snmptt /etc/init.d/nagios)
no output for (# grep -i snmptt /etc/init.d/nagios)
Regards,
Murawweh Daher
Murawweh Daher
Re: snmptt status and actions
I believe what @gormank meant was to modify your nagios init script at /etc/init.d/nagios by modifying the following.
Look for -
above the echo " done." line, add -
The final result will look like -
This will cause the snmptt service to restart every time nagios is restarted.
Look for -
Code: Select all
echo " done."
;;
stop)
echo -n "Stopping nagios:"
Code: Select all
/etc/init.d/snmptt restart
Code: Select all
/etc/init.d/snmptt restart
echo " done."
;;
stop)
echo -n "Stopping nagios:"
Former Nagios Employee
Re: snmptt status and actions
I think that's a more verbose way of saying what I said...
Since this solution was provided by Nagios and is long known, why not add an if statement (in case snmptt isn't used) to the init script to restart the service rather than rediscovering the solution periodically. I think a search of the board will show this has happened several times.
Since this solution was provided by Nagios and is long known, why not add an if statement (in case snmptt isn't used) to the init script to restart the service rather than rediscovering the solution periodically. I think a search of the board will show this has happened several times.
Re: snmptt status and actions
Your post was straight to the point, but I wanted to outline it for anyone that was confused should this get indexed.
I will discuss it with the developers and see what they say.
I will discuss it with the developers and see what they say.
Former Nagios Employee