Fujitsu servers

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Fujitsu servers

Postby orani » Fri Jan 06, 2017 8:01 pm

Hi all,

I have some fujitsu servers and i try monitoring them throw the management card.
I got the "check_fujitsu_server.pl" script from here (https://exchange.nagios.org/directory/P ... 29/details).

When i run the script from the command line i get the response i should. For example i run a check for the server fans and i get "cooling ok" as a response. When i run the check for the temp i get tempratures for every available sensor. That is perfect.

The problem is that when i run the same check from nagios by defining a service and the necessary command i am getting a general response for everything and not just for the wanted.

You can see below what i mean.

From command line:

[root@telematics libexec]# ./check_fujitsu_server.pl -H Infra1 -A 10.0.5.15 -C public --chkenv-fan
OK Cooling(ok)
[root@telematics libexec]# ./check_fujitsu_server.pl -H Infra1 -A 10.0.5.15 -C public --chkenv-temp
OK TemperatureSensors(ok)
| Ambient=20C;37;42 Systemboard=42C;75;80 VR_CPU1=41C;120;125 VR_MEM_AB=29C;120;125 VR_MEM_CD=36C;120;125 VR_CPU2=30C;120;125 VR_MEM_EF=32C;120;125 VR_MEM_GH=24C;120;125 CPU1=42C;82;83 MEM_A=27C;78;82 PSU1_Inlet=35C;57;61 PSU2_Inlet=36C;57;61 PSU1=61C;102;107 PSU2=63C;102;107



From Nagios (code is below - response is at the attachment):

define service{
host_name Infra1
service_description Management
check_command check_fujitsu_server!10.0.5.15!-C public!'--chkcooling'
max_check_attempts 5
check_interval 1
retry_interval 1
check_period 24x7
servicegroups iRMC
notification_interval 0
notification_options c,r,s
notes_url http://10.0.5.15
}
Attachments
Screenshot_1.jpg
orani
 
Posts: 121
Joined: Wed May 06, 2015 3:33 pm

Re: Fujitsu servers

Postby dwhitfield » Mon Jan 09, 2017 10:19 am

What version of Core are you using? Was it compiled from source or installed from distro repos? On what OS/version is nagios running? cat /etc/*-release may be of use. These questions will help us double check file paths.

Is it possible you have two versions of Nagios running? Strange things can happen when one version is installed via repo and another is compiled from source.
https://support.nagios.com/forum/viewtopic.php?f=6&t=1274 says XI at the top, but it more-or-less applies to everything.
User avatar
dwhitfield
Support Tech
 
Posts: 1845
Joined: Wed Sep 21, 2016 10:29 am
Location: Nagios Enterprises, LLC

Re: Fujitsu servers

Postby orani » Thu Jan 12, 2017 1:59 am

My version is Nagios Core 4.2.0. It is compiled from source as the documentation says. I am running Centos 6.8. Nagios Core 4.2.0 is the only version of nagios that is installed and running
orani
 
Posts: 121
Joined: Wed May 06, 2015 3:33 pm

Re: Fujitsu servers

Postby ssax » Thu Jan 12, 2017 2:52 pm

It may be a permissions issue, please run su - nagios (make sure to include the minus (-)) first:

Code: Select all
su - nagios
/usr/local/nagios/libexec/check_fujitsu_server.pl -H Infra1 -A 10.0.5.15 -C public --chkenv-fan


Send us the entire output if there are errors (it may be a /tmp file that has root permissions so the plugin can't access it when run by nagios).


Thank you
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
ssax
Dreams In Code
 
Posts: 2749
Joined: Wed Feb 11, 2015 12:54 pm

Re: Fujitsu servers

Postby orani » Sun Jan 15, 2017 4:45 pm

when i run the script as root it gives me the same output as when i run it as nagios user. (OK Cooling(ok))
orani
 
Posts: 121
Joined: Wed May 06, 2015 3:33 pm

Re: Fujitsu servers

Postby rkennedy » Mon Jan 16, 2017 1:02 pm

Please show us the full output.
rkennedy
 
Posts: 6503
Joined: Mon Oct 05, 2015 11:45 am

Re: Fujitsu servers

Postby orani » Mon Jan 16, 2017 11:21 pm

Code: Select all
[root@telematics libexec]# /usr/local/nagios/libexec/check_fujitsu_server.pl -H Infra1 -A 10.0.5.15 -C public --chkenv-fan
OK Cooling(ok)
[root@telematics libexec]# su - nagios
[nagios@telematics ~]$ /usr/local/nagios/libexec/check_fujitsu_server.pl -H Infra1 -A 10.0.5.15 -C public --chkenv-fan
OK Cooling(ok)
[nagios@telematics ~]$
orani
 
Posts: 121
Joined: Wed May 06, 2015 3:33 pm

Re: Fujitsu servers

Postby rkennedy » Tue Jan 17, 2017 11:00 am

Got it - doesn't look like permissions. Please post your command definition for check_fujitsu_server - we'll probably need to make changes here.
rkennedy
 
Posts: 6503
Joined: Mon Oct 05, 2015 11:45 am

Re: Fujitsu servers

Postby orani » Tue Jan 17, 2017 9:40 pm

Code: Select all
define command {
        command_name                    check_fujitsu_server
        command_line                    $USER1$/check_fujitsu_server.pl -H $HOSTADDRESS$ -A $ARG1$ $ARG2$
}             
orani
 
Posts: 121
Joined: Wed May 06, 2015 3:33 pm

Re: Fujitsu servers

Postby rkennedy » Wed Jan 18, 2017 10:54 am

orani wrote:
Code: Select all
define command {
        command_name                    check_fujitsu_server
        command_line                    $USER1$/check_fujitsu_server.pl -H $HOSTADDRESS$ -A $ARG1$ $ARG2$
}             


Your arguments do not line up properly.

Code: Select all
check_command check_fujitsu_server!10.0.5.15!-C public!'--chkcooling'


You'll want to set the check_command up in the service like this -
Code: Select all
check_command check_fujitsu_server!10.0.5.15!-C public '--chkcooling'


The reason is because you do not have a $ARG3$ in your command_line. The other option is appending $ARG3$ to your command_line. The choice is yours.

After making the change, restart the nagios service, and you should see the expected result.
rkennedy
 
Posts: 6503
Joined: Mon Oct 05, 2015 11:45 am

Next

Return to Nagios Core

Who is online

Users browsing this forum: Google [Bot], Ravina, Yahoo [Bot] and 8 guests