Hi Virgile,
No they haven.'t. But we found out how the host user profiles are working now.
It is very case-sensitive. :)
So the problem with de Host User Profiles is solved. After trying with IP addresses it's al working fine. So I gueses it has to do something with my definitions in de config files and the defnitions created with the "/bin/bash /usr/local/nagios/libexec/host_config.sh" command. If you use UPPERCASE overhere you have to you UPPERCASE in the servernames you use overhere.. Or LOWER case if you want but it MUST be the same use on both places.
The second problem was running the commands from within the config files.
E.G.
#####################################################
# CPU Utilization Check #
#####################################################
define service {
hostgroup_name IBMi_servers
service_description Check CPU Utilization
check_command check-ibmi-cpu-utilization!CPU!80!90
max_check_attempts 3
check_interval 5
retry_interval 3
check_period 24x7
notification_interval 30
notification_period 24x7
notification_options w,c,r
notifications_enabled 1
contact_groups IBMi-Contacts
}
At first I had "check-ibmi-cpu-utilization!80!90" as command because I assumed that running the command "check-ibmi-cpu-utilization" also means that this does run the CPU part of the command. But that assumption was wrong of me. After a lot of puzzling I figured out that there als must be d\e parameter "!CPU" has to be aded as first parameter of the command in de config file. After finding out that, it was easy doing the rest of the commands to figure out.
At this moment there is only one challenge open. On out only 7.5 server we get the message "error - CPFB003: Certificate store password is not valid". It's not clear at the moment what is happening there and why it needs something to do with the certificate store.
At the moment I only have one 7.5 server available but we try to get a second one available soon to see if it could be a 7.5 "problem" or it's a specific server "problem".
Grt. Tom.
------------------------------
Tom Smit
------------------------------
Original Message:
Sent: Thu March 21, 2024 05:43 AM
From: Virgile VATIN
Subject: Questions about Nagios plugin for IBMi
Hi Tom,
Does the OS are the same and have the same PTF level ?
Regard's
------------------------------
Virgile VATIN
Original Message:
Sent: Fri March 15, 2024 05:37 AM
From: Tom Smit
Subject: Questions about Nagios plugin for IBMi
Is there anybody who knows how host user profiles are working and what the connection is with the hostname or IP addresses working with the IBMi plugin for Nagios.
And YES I have the standard explanations found on the WWW. It's also not clear how to add parameters to these commands.
Or a (short) manual how to place parameters within the service definitions eg for warning and critical leves for disk usage?
I'm using the Nagios core module with the IBMi plugin correctly installed on a Linux server running on powersystem.
Host definition:
This check is working fine.
#####################################################
# HOST DEFINITION #
#####################################################
define host {
host_name hostname
alias hostname
address ip-address
max_check_attempts 3
check_period 24x7
check_command check-host-alive
check_interval 5
contact_groups IBMi-Contacts
notification_interval 60
notification_period 24x7
}
Service definitions:
This service is also running okay on two of three hosts (one host gives an error "Error - CPFB003: Certificate store password is not valid. "
#####################################################
# Diskconfig Check #
#####################################################
define service {
hostgroup_name IBMi_servers
service_description Check Diskconfig
check_command check-ibmi-disk-config
max_check_attempts 3
check_interval 5
retry_interval 3
check_period 24x7
notification_interval 30
notification_period 24x7
notification_options w,c,r
notifications_enabled 1
contact_groups IBMi-Contacts
}
On the third host I get
[nagios@<nagioshost> objects]$ /bin/bash /usr/local/nagios/libexec/check_ibmi_status.sh -M DiskConfig -H 10.181.12.245
Error - CPFB003: Certificate store password is not valid.
com.ibm.nagios.util.QYHCHCOP.run(QYHCHCOP.java:59)
com.ibm.nagios.service.impl.DiskConfig.execute(DiskConfig.java:63)
com.ibm.nagios.RequestHandler.CollectStatus(RequestHandler.java:29)
com.ibm.nagios.RequestHandler.process(RequestHandler.java:16)
com.ibm.nagios.CheckIBMiStatus.run(CheckIBMiStatus.java:18)
com.ibm.nagios.ConnectToSystem.run(ConnectToSystem.java:64)
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
java.base/java.lang.Thread.run(Thread.java:834)
[nagios@SUCENA53 objects]$
All other services aren't working at all, giving a java error.
Exception - java.lang.NullPointerException.
Al definitions are the same as the firts definition which is working okay.
#####################################################
# Basic Info Check #
#####################################################
define service {
hostgroup_name IBMi_servers
service_description Check Basic info
check_command check-ibmi-basic-info
max_check_attempts 3
check_interval 5
retry_interval 3
check_period 24x7
notification_interval 30
notification_period 24x7
notification_options w,c,r
notifications_enabled 1
contact_groups IBMi-Contacts
}
When running the command directly from the commandline it al works perfectly
eg.
/bin/bash /usr/local/nagios/libexec/check_ibmi_status.sh -M BasicInfo -H <hostname>
Gives me the versionnumber of the systemsoftware running on that machine.
See attachment.
Hopefullly I described the problem clearly enough. If not please respond. Thanks in Advance.
------------------------------
Tom Smit
------------------------------