Can Nagios implement with Expect to automate tasks when issues arise?

Patrick M. patrickm at garlic.com
Sat Nov 17 01:02:22 CET 2007


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
> chris at chrisserafin@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 at 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/vse0120000070mrt/direct/01/
_______________________________________________
Nagios-users mailing list
Nagios-users at 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





More information about the Users mailing list