Re: [Nagios-users] Can Nagios implement with Expect to automate tasks when issues arise?
This is just an update to my post, but I used a combination of Escalations and Expect to issue a reboot of the power strip's port to that machine when it goes down. There's a script that you can find normally if you install the dev packages of expect on your linux distro. It's in the examples directory of the dev after it's installed, it's called autoexpect. If you run that, you can have it watch what you do, and it will create a script based on what you do. That's the easiest way I found - and it works like a charm! Patrick ChrisSerafin wrote: Ya I'm looking to do the same thing. I have Cisoc routers w/ VPNs that go doen for one reason or another (bad EU circuits). I normally just login and clear the cryptos or reload the device. I would like to automate the process. but I'm in the stages of getting basic monitoring and alerting up and running. Let me know what you find. Chris Serafin Security Engineer [EMAIL PROTECTED]@com Patrick M. wrote: Hi all, I just learned what Expect was and wrote a few scripts to automate certain tasks around the office, and now I'm wondering if Expect can be used in conjunction with Nagios. Is this possible? Example: One of our servers go down at least twice a day, and we know it's problematic. We connect to the power strip and recycle the power on the port that machine is plugged in. I'd like to use Expect to automate this when Nagios notices it is down. Has anyone else implemented something similar to what I'm describing? Thanks in advance. - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] Can Nagios implement with Expect to automate tasks when issues arise?
Event handlers can take care of any common task but you need to be careful with them. Why is a task required to be done so frequently? Shouldn't we take care of the cause rather than the symptom? Also, scripts that fix known problems can be very dangerous if they inadvertantly run at times when a service/host looks critical but perhaps critical wasn't well enough defined, particularly if you're not using parent dependancies. So if you do go this root (pun intended), add in a LOT of checks to the expect script. On Nov 14, 2007 11:27 AM, Patrick M. [EMAIL PROTECTED] wrote: Hi all, I just learned what Expect was and wrote a few scripts to automate certain tasks around the office, and now I'm wondering if Expect can be used in conjunction with Nagios. Is this possible? Example: One of our servers go down at least twice a day, and we know it's problematic. We connect to the power strip and recycle the power on the port that machine is plugged in. I'd like to use Expect to automate this when Nagios notices it is down. Has anyone else implemented something similar to what I'm describing? Thanks in advance. - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] Can Nagios implement with Expect to automate tasks when issues arise?
Until we can move the scripts off that machine onto its new home, we have to reboot this system. Sometimes it happens once, sometimes it happens multiple times a day. These aren't critical systems, so it wouldn't hurt anything if these were rebooted multiple times. Thank you very much for the information, and the pointers. And yes, I agree - we should take care of the cause rather than the symptom. Thanks again. Patrick dave stern - e-mail.pluribus.unum wrote: Event handlers can take care of any common task but you need to be careful with them. Why is a task required to be done so frequently? Shouldn't we take care of the cause rather than the symptom? Also, scripts that fix known problems can be very dangerous if they inadvertantly run at times when a service/host looks critical but perhaps critical wasn't well enough defined, particularly if you're not using parent dependancies. So if you do go this root (pun intended), add in a LOT of checks to the expect script. On Nov 14, 2007 11:27 AM, Patrick M. [EMAIL PROTECTED] wrote: Hi all, I just learned what Expect was and wrote a few scripts to automate certain tasks around the office, and now I'm wondering if Expect can be used in conjunction with Nagios. Is this possible? Example: One of our servers go down at least twice a day, and we know it's problematic. We connect to the power strip and recycle the power on the port that machine is plugged in. I'd like to use Expect to automate this when Nagios notices it is down. Has anyone else implemented something similar to what I'm describing? Thanks in advance. - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null