Page 1 of 1

Nagios - weblogic plugin check_wls.pl

Posted: Fri Jan 13, 2017 9:15 am
by cooljsmb
Hi There,

I am trying to monitor weblogic application server. Although the perl command returns OK status , when executed from Unix shell. I am getting following error being displayed on Nagios web console -
Anyone got any clues where I have gone wrong?

(No output returned from plugin)


This is the configuration I have applied so far.

---- localhost.cfg ----

define service{
use local-service
host_name localhost ; The name of the host the service is associated with
service_description WEBLOGIC ; The service description
check_command check_wls!10!5!/usr/local/nagios/etc/wls_config ; The command used to monitor the service
notifications_enabled 0
}

---- commands.cfg -----

# 'check_wls' command definition
define command{
command_name check_wls
command_line /usr/local/nagios/libexec/check_wls.pl -C -L $ARG3$ -w $ARG1$ -c $ARG2$
}


---- actual user command ----

[root@HP4440-03 objects]# /usr/local/nagios/libexec/check_wls.pl -C -L /usr/local/nagios/etc/wls_config -w 90 -c 95
OK| Managed_Server=6;90;95;;


---------- Nagios web console---------

WEBLOGIC UNKNOWN 01-11-2017 15:28:40 0d 2h 37m 44s 4/4 (No output returned from plugin)

Re: Nagios - weblogic plugin check_wls.pl

Posted: Fri Jan 13, 2017 1:38 pm
by avandemore
Are you running as same user when testing from the cli? It doesn't appear so from your example.

Code: Select all

# su - nagios
$ <plugin> <plugin args>
You can also turn up Nagios logging to see out the plugin is being executed:

https://assets.nagios.com/downloads/nag ... gmain.html

Re: Nagios - weblogic plugin check_wls.pl

Posted: Mon Jan 16, 2017 2:10 am
by cooljsmb
Hi There,

Thank you for the response. This is what I see from cli-

[nagios@HP4440-03 ADF_Domain]$ /usr/local/nagios/libexec/check_wls.pl -C -L /usr/local/nagios/etc/wls_config -w 90 -c 95

OK| Managed_Server=25;90;95;;

[nagios@HP4440-03 ADF_Domain]$ id
uid=54323(nagios) gid=54325(nagios)

Regards
-Jas

Re: Nagios - weblogic plugin check_wls.pl

Posted: Mon Jan 16, 2017 2:13 am
by cooljsmb
This is what I see in nagios.log-

[1484550643] SERVICE ALERT: localhost;WEBLOGIC;UNKNOWN;HARD;4;(No output returned from plugin)
[1484550643] SERVICE NOTIFICATION: nagiosadmin;localhost;WEBLOGIC;UNKNOWN;notify-service-by-email;(No output returned from plugin)

Re: Nagios - weblogic plugin check_wls.pl

Posted: Mon Jan 16, 2017 3:56 am
by cooljsmb
Hi There,

Its working now. You were right - it was user problem.

Regards
-Jas

Re: Nagios - weblogic plugin check_wls.pl

Posted: Mon Jan 16, 2017 10:23 am
by dwhitfield
Glad to hear it is resolved. I am going to lock the thread. Please feel free to post again if you have you another issue. Thank you for using the Nagios forums!