Nagios - weblogic plugin check_wls.pl

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
cooljsmb
Posts: 5
Joined: Fri Jan 13, 2017 9:10 am

Nagios - weblogic plugin check_wls.pl

Post 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)
Last edited by dwhitfield on Mon Jan 16, 2017 10:23 am, edited 1 time in total.
Reason: marking with green check mark
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: Nagios - weblogic plugin check_wls.pl

Post 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
Previous Nagios employee
cooljsmb
Posts: 5
Joined: Fri Jan 13, 2017 9:10 am

Re: Nagios - weblogic plugin check_wls.pl

Post 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
cooljsmb
Posts: 5
Joined: Fri Jan 13, 2017 9:10 am

Re: Nagios - weblogic plugin check_wls.pl

Post 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)
cooljsmb
Posts: 5
Joined: Fri Jan 13, 2017 9:10 am

Re: Nagios - weblogic plugin check_wls.pl

Post by cooljsmb »

Hi There,

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

Regards
-Jas
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Nagios - weblogic plugin check_wls.pl

Post 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!
Locked