Sponsored Content
Top Forums Shell Programming and Scripting Expect script works on CLI, but not under Nagios Post 302831327 by maddynaresh on Wednesday 10th of July 2013 05:01:31 PM
Old 07-10-2013
Hi Guys,
I need a help in nagios notifications setup.
I have a script that will generate alert for w and critical based on a condition.
What I want is that "Nagios should send out an alert for warning only if the condition i.e. written in the script exists for more than an 1hr then. No change is required for critical."
Please help me on this Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

strange expect script behavior, or am i misunderstanding expect scripting?

Hello to all...this is my first post (so please go easy). :) I feel pretty solid at expect scripting, but I'm running into an issue that I'm not able to wrap my head around. I wrote a script that is a little advanced for logging into a remote Linux machine and changing text in a file using sed.... (2 Replies)
Discussion started by: v1k0d3n
2 Replies

2. Shell Programming and Scripting

Need help with Expect script for Cisco IPS Sensors, Expect sleep and quoting

This Expect script provides expect with a list of IP addresses to Cisco IPS sensors and commands to configure Cisco IPS sensors. The user, password, IP addresses, prompt regex, etc. have been anonymized. In general this script will log into the sensors and send commands successfully but there are... (1 Reply)
Discussion started by: genewolfe
1 Replies

3. Shell Programming and Scripting

simple php/expect script works from command line but not from web

I have a really basic expect script which I call from php. I works fine when I run the php from the shell, but from the web it appears as if the output buffer gets chopped and never gets all of the contents. php script: (runexpect.php) <?php... (7 Replies)
Discussion started by: jacksona2
7 Replies

4. Shell Programming and Scripting

Reading CLI input for script

I've always written scripts where the user executes the script and I prompt them for what they want to do. But I'm trying to write a script where root executes the script 'lock' or its hard-link 'unlock' and the script will passwd -l or passwd -u an account depending on the choice. What would... (3 Replies)
Discussion started by: ADay2Long
3 Replies

5. Shell Programming and Scripting

Not the correct output, works fine via CLI, not inside the script.

Guys, I need you help please. The script below is not working correclty for checking via a awk/if statement . Can you tell me what i am doing wrong in the script code "if($1 == "$RETENTION_LEVEL") " Syntax RETENTION_LEVEL=`echo $LINE | cut -f2 -d" "` echo " ==============... (4 Replies)
Discussion started by: Junes
4 Replies

6. Programming

Calling expect script inside another expect

Hi, Am very new to expect scripting.. Can You please suggest me how to call an expect script inside another expect script.. I tried with spawn /usr/bin/ksh send "expect main.exp\r" expect $root_prompt and spawn /usr/bin/ksh send "main.exp\r" expect $root_prompt Both... (1 Reply)
Discussion started by: Priya Amaresh
1 Replies

7. Programming

Calling another expect script inside an expect script

I have an expect script called remote that I want to call from inside my expect script called sudoers.push, here is the code that is causing me issues: set REMOTE "/root/scripts/remote" ... log_user 1 send_user "Executing remote script as $user...\n" send_user "Command to execute is: $REMOTE... (1 Reply)
Discussion started by: brettski
1 Replies

8. Shell Programming and Scripting

Controlling elinks from Pipe, CLI or Script

Hi guys, I’m looking for an automatic way to save the source code of an website to a file. My questions is, it is possible to control elinks from a script, pipe or cli? I need to open a website, login on this site by a webform, submit the form, open an new url and save the source code of a... (2 Replies)
Discussion started by: digg_de
2 Replies

9. Programming

Expect script returning string following a found expect.

I'm fairly new to scripting so this might not be possible. I am using Expect with Cisco switches and need to capture the string after finding the expect request. For example, when I issue "show version" on a Nexus switch, I'm looking to capture the current firmware version: #show version ... (0 Replies)
Discussion started by: IBGaryA
0 Replies

10. UNIX for Beginners Questions & Answers

Expect scripting issue, works interactively when doing commands in cli, does not work in script

Hi; problem may be obvious, simple but I have to say it is somehow not easy to locate the issue. I am doing some word extracting from multiline text. Interacting in CLI seems to work without issues. First step is to add multiline text to a variable. expect1.1> expect1.1> set... (2 Replies)
Discussion started by: aldowski
2 Replies
CHECK_LM_SENSORS(7)					User Contributed Perl Documentation				       CHECK_LM_SENSORS(7)

NAME
"check_lm_sensors" - Nagios plugin to monitor hardware sensors and disk temperatures DESCRIPTION
check_lm_sensors is a Nagios plugin to monitor the values of on board sensors and hard disk temperatures on Linux systems VERSION
Version 3.1.1 SYNOPSIS
check_lm_sensors [--help] [--verbose] [--version] [OPTIONS] Options -?, --help help -l, --low specifies a check for a sensor value which is too low. -h, --high specifies a check for a sensor value which is too high. -r, --range specifies a check for a sensor value which should stay in a given range. --rename renames a sensor in the performance output (useful if you want to have common names for similar sensors across different machines) --sanitize sanitize sensor names (e.g., removing spaces) --nosensors disable checks on check lm_sensors --nodrives disable checks on drive temperatures -d, --drives enable checks on drive temperature --hddtemp_bin manually specifies the location of the hddtemp binary --sensors_bin manually specified the location of the sensors binary -v, --verbose verbose output --version prints $prog_name's version and exits REQUIRED ARGUMENTS
OPTIONS
EXAMPLE
DIAGNOSTICS
You can specify multiple --verbose options to increase the program verbosity. EXIT STATUS
0 if OK, 1 in case of a warning, 2 in case of a critical status and 3 in case of an unknown problem DEPENDENCIES
check_updates depends on o Carp o English o Getopt::Long o Nagios::Plugin o Nagios::Plugin::Threshold o version CONFIGURATION
INCOMPATIBILITIES
None reported. SEE ALSO
Nagios documentation BUGS AND LIMITATIONS
No bugs have been reported. Please report any bugs or feature requests to matteo.corti@id.ethz.ch, or through the web interface at https://svn.id.ethz.ch/trac/nagios_plugins/newticket AUTHOR
Matteo Corti <matteo.corti@id.ethz.ch> LICENSE AND COPYRIGHT
Copyright (c) 2007, ETH Zurich. This module is free software; you can redistribute it and/or modify it under the terms of GNU general public license (gpl) version 3. See the LICENSE file for details. DISCLAIMER OF WARRANTY
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. ACKNOWLEDGMENTS
perl v5.14.2 2012-07-02 CHECK_LM_SENSORS(7)
All times are GMT -4. The time now is 03:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy