LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 02-26-2013, 07:23 AM   #1
sunnysthakur
Member
 
Registered: Aug 2012
Posts: 43

Rep: Reputation: Disabled
Nagios Plugin [.sh] not working


Hello.

I am working on setup a nagios plugin for monitor tomcat instance from tomcat manager.

This is a script file downloaded from
PHP Code:
http://exchange.nagios.org/directory/Plugins/Java-Applications-and-Servers/Apache-Tomcat/check_TomcatApplication/details 
This is working fine when executed as shell by passing variables

PHP Code:
[root@monitor ~]# ./check_TomcatApplication --user admin --password password --host 192.168.11.15 --port 8080 --appname DEMO_32

OKApplication DEMO_32 is running
Now when i configured this as a nagios command in command.cfg this is not working.

PHP Code:
define command{
       
command_name check_TomcatApplication
       command_line $USER1
$/check_TomcatApplication --user $USER13$ --password $USER14$ --host $HOSTADDRESS$ --port $ARG1$ --appname $ARG2$
       } 
Below is the lines added in services.cfg of nagios to add the same for host

PHP Code:
# check Tomcat Status
define service{
        use                            
generic-service
        host_name                      hostname
        service_description            Tomcat Status
        is_volatile                    0
        check_period                   24x7
        max_check_attempts             3
        normal_check_interval          3
        retry_check_interval           1
        contact_groups                 winadmins
        notification_interval          120
        notification_period            24x7
        notification_options           w
,u,c,r
        check_command               check_TomcatApplication
!8080!DEMO_32 
But on UI it says application is not running.

Please help me to figure out this issue
 
Old 02-26-2013, 09:50 AM   #2
Habitual
Senior Member
 
Registered: Jan 2011
Distribution: Undecided
Posts: 3,157
Blog Entries: 4

Rep: Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760
Code:
define command{
command_name check_TomcatApplication
command_line $USER1$/check_TomcatApplication --user admin --password password --host $HOSTADDRESS$ --port $ARG1$ --appname $ARG2$ 
}
 
Old 02-27-2013, 07:13 AM   #3
sunnysthakur
Member
 
Registered: Aug 2012
Posts: 43

Original Poster
Rep: Reputation: Disabled
Smile

Hello,

Thanks for helping me out here.
I used hard values for --user and --password and now this is working fine.

help appreciated...
 
Old 02-27-2013, 02:14 PM   #4
Habitual
Senior Member
 
Registered: Jan 2011
Distribution: Undecided
Posts: 3,157
Blog Entries: 4

Rep: Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760
Quote:
Originally Posted by sunnysthakur View Post
I used hard values for --user and --password and now this is working fine.

help appreciated...
Glad it worked out!
 
  


Reply

Tags
linux, monitor, nagios, plugin


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 not working (http://localhost/nagios or http://ip/nagios) 404 error connect2janu Linux - Server 1 11-18-2012 02:06 AM
How to use Nagios plugin? dwarf007 Linux - Software 20 10-03-2011 06:11 AM
[SOLVED] Nagios Plugin nico34 Linux - Server 4 06-17-2011 06:46 AM
nagios plugin working fine but in web it is giving different message sarathveera Linux - Software 15 02-10-2010 10:06 AM
Nagios Plugin fullgore *BSD 3 10-22-2008 08:52 AM


All times are GMT -5. The time now is 07:00 AM.

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