Visit Jeremy's Blog.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 04-19-2007, 03:37 AM   #1
LQ Newbie
Registered: Apr 2007
Posts: 5

Rep: Reputation: 0
Shown Invalid Service Status Value in Nagios network application

Hi all
Iam using nagios network application.when i trying to found status of service in network.It shown invalid status value in nagios application. I wrote a code as mentioned belw

/etc/init.d/$service status | while read t
echo $t
if [[ "$t" == *running* ]]
        echo "Service is running "
        echo "Service is stopped"

In runtime,it shown a correct service status value.But when i trying to use from nagios.It shows a invalid status value.

Please tell me any solution on this issue.

Last edited by sureshkumar.repaka; 04-19-2007 at 05:47 AM.
Old 04-19-2007, 05:34 AM   #2
Registered: Aug 2006
Location: Saint Paul, MN, USA
Distribution: {Free,Open}BSD, CentOS, Debian, Fedora, Solaris, SuSE
Posts: 732

Rep: Reputation: 75

I think you used the code from too literally -- at least the messages are a bit odd -- you check for keyword running, but provide messages for shell.

As I noted in the other thread, please use CODE blocks to display scripts and fragments -- select the text, then click the # symbol just above the editing window.

I cannot help you with the nagios aspect, but someone will likely stop by to advise you ... cheers, makyo


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Nagios - Return code of 127 for check of service sriramsreedhar Linux - General 5 11-14-2016 02:32 PM
LXer: Complex service checks with Nagios LXer Syndicated Linux News 0 04-06-2007 07:02 PM
nagios check service noir911 Linux - Networking 5 07-24-2006 05:12 PM
can't stop service name shown by nmap mrpc_cambodia Red Hat 1 11-15-2004 07:52 AM
Problem when Nagios Monitoring runs ping service sanfran49 Linux - Software 0 08-22-2003 12:12 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:42 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration