check_hpasm incorrect results
check_hpasm incorrect results
Hello,
check_hapasm reporting nagios server information rather than requested server information
[root@nagios]# ./check_hpasm -H sqlserver -C public-snmp
OK - System: 'proliant dl380 g5', S/N: 'CZC6425STZT', ROM: 'P56 01/24/2008', hardware working fine, da: 1 logical drives, 7 physical drives | fan_1=50% fan_10=50% fan_11=50% fan_12=50% fan_2=50% fan_3=50% fan_4=50% fan_5=50% fan_6=50% fan_7=50% fan_8=50% fan_9=50% temp_1_ioBoard=45;70;70 temp_2_ambient=23;39;39 temp_3_cpu=32;127;127 temp_4_cpu=32;127;127 temp_5_powerSupply=44;77;77
But on the nagios webpage:
OK - System: 'proliant dl360 g7', S/N: 'CZJ03704D28', ROM: 'P68 01/28/2011', hardware working fine, da: 1 logical drives, 4 physical drives
The first from the commnad line is correct for the sqlserver but the second is information from the nagios server itself!
Where is the nagios server incorrectly reading itself rather than the address of the server I want information from?
define command {
command_name nrpe_check_hpasm
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_hpasm -t 60
}
define service {
use generic-service
hostgroup_name tec-Windows-Hardware
service_description SYS - Hardware
contact_groups Notify-Intern
check_period 24x7
notification_interval 60
notification_options w,u,c,r
notification_period 24x7
check_command check_hpasm
max_check_attempts 3
normal_check_interval 60
retry_check_interval 1
}
define host {
use generic-host
host_name SQLSERVER
alias SQLSERVER
address 10.100.8.39
parents FRONT
check_command check-host-alive
max_check_attempts 3
notification_interval 60
notification_period 24x7
notification_options d,u,r
contact_groups Notify-Intern
}
I see this as a nagios problem as it works from the command prompt.
Any help would be appreciated, thank you,
JulianD
check_hapasm reporting nagios server information rather than requested server information
[root@nagios]# ./check_hpasm -H sqlserver -C public-snmp
OK - System: 'proliant dl380 g5', S/N: 'CZC6425STZT', ROM: 'P56 01/24/2008', hardware working fine, da: 1 logical drives, 7 physical drives | fan_1=50% fan_10=50% fan_11=50% fan_12=50% fan_2=50% fan_3=50% fan_4=50% fan_5=50% fan_6=50% fan_7=50% fan_8=50% fan_9=50% temp_1_ioBoard=45;70;70 temp_2_ambient=23;39;39 temp_3_cpu=32;127;127 temp_4_cpu=32;127;127 temp_5_powerSupply=44;77;77
But on the nagios webpage:
OK - System: 'proliant dl360 g7', S/N: 'CZJ03704D28', ROM: 'P68 01/28/2011', hardware working fine, da: 1 logical drives, 4 physical drives
The first from the commnad line is correct for the sqlserver but the second is information from the nagios server itself!
Where is the nagios server incorrectly reading itself rather than the address of the server I want information from?
define command {
command_name nrpe_check_hpasm
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_hpasm -t 60
}
define service {
use generic-service
hostgroup_name tec-Windows-Hardware
service_description SYS - Hardware
contact_groups Notify-Intern
check_period 24x7
notification_interval 60
notification_options w,u,c,r
notification_period 24x7
check_command check_hpasm
max_check_attempts 3
normal_check_interval 60
retry_check_interval 1
}
define host {
use generic-host
host_name SQLSERVER
alias SQLSERVER
address 10.100.8.39
parents FRONT
check_command check-host-alive
max_check_attempts 3
notification_interval 60
notification_period 24x7
notification_options d,u,r
contact_groups Notify-Intern
}
I see this as a nagios problem as it works from the command prompt.
Any help would be appreciated, thank you,
JulianD
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: check_hpasm incorrect results
I think you are querying two different servers:
This command is querying the DNS address sqlserver
This command is querying the DNS address sqlserver
Your host definition is querying the host 10.100.8.39JulianD wrote:[root@nagios]# ./check_hpasm -H sqlserver -C public-snmp
What ip address do you get when you ping sqlserverJulianD wrote:define host {
use generic-host
host_name SQLSERVER
alias SQLSERVER
address 10.100.8.39
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: check_hpasm incorrect results
Hello,
Apologies, I copy and pasted too fast as when I first wrote post I lost it after being asked for password.
The qoute should be
define host {
use generic-host
host_name SQLSERVER
alias SQLSERVER
address 10.100.8.6
parents FRONT
check_command check-host-alive
max_check_attempts 3
notification_interval 60
notification_period 24x7
notification_options d,u,r
contact_groups Notify-Intern
}
I didn't check the ip address when copying. Sorry about that. co worker then though that it could be dns but impossible as this is a production server for a large customer.
Thanks for your assistence,
JulianD
Apologies, I copy and pasted too fast as when I first wrote post I lost it after being asked for password.
The qoute should be
define host {
use generic-host
host_name SQLSERVER
alias SQLSERVER
address 10.100.8.6
parents FRONT
check_command check-host-alive
max_check_attempts 3
notification_interval 60
notification_period 24x7
notification_options d,u,r
contact_groups Notify-Intern
}
I didn't check the ip address when copying. Sorry about that. co worker then though that it could be dns but impossible as this is a production server for a large customer.
Thanks for your assistence,
JulianD
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: check_hpasm incorrect results
No problems.
I think the core of the problem is that you're trying to use NRPE for an SNMP based check.
NRPE is for executing checks on remote systems when the required check needs to be run (directly) on the remote system.
The example you've provided for check_hpasm shows that it can connect to a remote server using SNMP, so there's no need to use NRPE.
Your command needs to be defined as follows:
And in your service definition:
Does that work?
I think the core of the problem is that you're trying to use NRPE for an SNMP based check.
NRPE is for executing checks on remote systems when the required check needs to be run (directly) on the remote system.
The example you've provided for check_hpasm shows that it can connect to a remote server using SNMP, so there's no need to use NRPE.
Your command needs to be defined as follows:
Code: Select all
define command {
command_name check_hpasm
command_line $USER1$/check_hpasm -H $HOSTADDRESS$ -C $ARG1$
}
Code: Select all
check_command check_hpasm!public-snmp
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: check_hpasm incorrect results
Hello again, and thanks for the help,
It would be nice if I had to sense check before I uploaded this the first time. Second mistake now shown up.
define command {
command_name check_hpasm
command_line $USER1$/check_hpasm $HOSTADDRESS$ -C $ARG1$
}
is the correct lines from the commands.cfg for the query.
So if I wrote my first post right the first time it would have had the following
from hosts.cfg...
define host {
use generic-host
host_name SQLSERVER
alias SQL
address 10.100.8.6
parents FRONT
check_command check-host-alive
max_check_attempts 3
notification_interval 60
notification_period 24x7
notification_options d,u,r
contact_groups Notify-Intern
}
from services.cfg...
define service {
use generic-service
hostgroup_name tec-Windows-Hardware
service_description SYS - Hardware
contact_groups Notify-Intern
check_period 24x7
notification_interval 60
notification_options w,u,c,r
notification_period 24x7
check_command check_hpasm
max_check_attempts 3
normal_check_interval 60
retry_check_interval 1
}
So this sqlserver is in a hostgroup with 54 other window servers. All the server show the result
OK - System: 'proliant dl360 g7', S/N: 'CZJ03704D8', ROM: 'P68 01/28/2011', hardware working fine, da: 1 logical drives, 4 physical drives
instead of their own.
What is this CZJ03704D8? It's the nagios server! But as I said this makes no sense to me as the check should run on each and every server.
Thanks!
It would be nice if I had to sense check before I uploaded this the first time. Second mistake now shown up.
define command {
command_name check_hpasm
command_line $USER1$/check_hpasm $HOSTADDRESS$ -C $ARG1$
}
is the correct lines from the commands.cfg for the query.
So if I wrote my first post right the first time it would have had the following
from hosts.cfg...
define host {
use generic-host
host_name SQLSERVER
alias SQL
address 10.100.8.6
parents FRONT
check_command check-host-alive
max_check_attempts 3
notification_interval 60
notification_period 24x7
notification_options d,u,r
contact_groups Notify-Intern
}
from services.cfg...
define service {
use generic-service
hostgroup_name tec-Windows-Hardware
service_description SYS - Hardware
contact_groups Notify-Intern
check_period 24x7
notification_interval 60
notification_options w,u,c,r
notification_period 24x7
check_command check_hpasm
max_check_attempts 3
normal_check_interval 60
retry_check_interval 1
}
So this sqlserver is in a hostgroup with 54 other window servers. All the server show the result
OK - System: 'proliant dl360 g7', S/N: 'CZJ03704D8', ROM: 'P68 01/28/2011', hardware working fine, da: 1 logical drives, 4 physical drives
instead of their own.
What is this CZJ03704D8? It's the nagios server! But as I said this makes no sense to me as the check should run on each and every server.
Thanks!
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: check_hpasm incorrect results
No problems, so is this working now for all 54 servers?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: check_hpasm incorrect results
No,
it is doing what I really don't need. Providing information from the nagios server rather than each server.
I cannot see where to look
thanks
JulianD
it is doing what I really don't need. Providing information from the nagios server rather than each server.
I cannot see where to look
thanks
JulianD
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: check_hpasm incorrect results
check_command needs to be:JulianD wrote:define service {
use generic-service
hostgroup_name tec-Windows-Hardware
service_description SYS - Hardware
contact_groups Notify-Intern
check_period 24x7
notification_interval 60
notification_options w,u,c,r
notification_period 24x7
check_command check_hpasm
max_check_attempts 3
normal_check_interval 60
retry_check_interval 1
}
Code: Select all
check_command check_hpasm!public-snmp
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: check_hpasm incorrect results
Hello,
Thank you. Change made bt I still get the information for the nagios server rather than server requested.
thanks
JulianD
Thank you. Change made bt I still get the information for the nagios server rather than server requested.
thanks
JulianD
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: check_hpasm incorrect results
Can you post a link to where you downloaded the plugin from.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.