Trouble with User Host Profile for IBMi Nagios plugin
Posted: Mon Mar 11, 2024 10:38 am
Hi all,
I'm trying to get de IBMi plugin for Nagios running.
Envrionment:
Linux server with Nagios core installed.
Latest IBMi for Nagios plugin installed.
A number of IBMi servers
If I write <hosts>, this text is replaced with the hostname of the IBMi server.
As a test I try to setup an IBMi server within the Nagios Core environment.
1. Created a user host profile with
/bin/bash /usr/local/nagios/libexec/host_config.sh -i <host>.
This is setup correctly and user can log in. Otherwise these command will give an error back that it is not possible to
connect/logon to the IBMI system.
2. I created a host config file for this server (in etc/objects/<host>.cfg) where I put the server definition. And for the test 1 service definition.
3. Put the name of the <host>.cfg file in the etc/nagios.cfg file to load during startup of the nagios server.
4. Run the "/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg" command and no errors show up.
5. Restart the nagios server.
In de simple Nagios Core GUI the server shows up and also the ping command to the server is working as check-alive-server.
Also the service check I defined in de <host>.cfg file is showing up but with the message : "host User Profile not set".
I allready start allover again. I also changed password to simple passwords with no special charaters. I removed and inserted the service again in de <host>.cfg file.
When I start the commands manually from the commandline to the configured IBMi server is seems working perfectly.
With the user root, nagiosadmin (no difference, it works)
E.g.
"/bin/bash ../../libexec/check_ibmi_status.sh -M BasicInfo -H <host>" (calling from objects directory)
It will give me the versionnumber of the IBMi software, in my case V7R4M0
Also all the other options built in in the IBMi plugin will work from the commandline without problem
But not from within the nagios core server/module/plugin.
Anybody some idea, any idea would be welcome.
Thanks in advance.
Kind regards,
Tom.
I'm trying to get de IBMi plugin for Nagios running.
Envrionment:
Linux server with Nagios core installed.
Latest IBMi for Nagios plugin installed.
A number of IBMi servers
If I write <hosts>, this text is replaced with the hostname of the IBMi server.
As a test I try to setup an IBMi server within the Nagios Core environment.
1. Created a user host profile with
/bin/bash /usr/local/nagios/libexec/host_config.sh -i <host>.
This is setup correctly and user can log in. Otherwise these command will give an error back that it is not possible to
connect/logon to the IBMI system.
2. I created a host config file for this server (in etc/objects/<host>.cfg) where I put the server definition. And for the test 1 service definition.
3. Put the name of the <host>.cfg file in the etc/nagios.cfg file to load during startup of the nagios server.
4. Run the "/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg" command and no errors show up.
5. Restart the nagios server.
In de simple Nagios Core GUI the server shows up and also the ping command to the server is working as check-alive-server.
Also the service check I defined in de <host>.cfg file is showing up but with the message : "host User Profile not set".
I allready start allover again. I also changed password to simple passwords with no special charaters. I removed and inserted the service again in de <host>.cfg file.
When I start the commands manually from the commandline to the configured IBMi server is seems working perfectly.
With the user root, nagiosadmin (no difference, it works)
E.g.
"/bin/bash ../../libexec/check_ibmi_status.sh -M BasicInfo -H <host>" (calling from objects directory)
It will give me the versionnumber of the IBMi software, in my case V7R4M0
Also all the other options built in in the IBMi plugin will work from the commandline without problem
But not from within the nagios core server/module/plugin.
Anybody some idea, any idea would be welcome.
Thanks in advance.
Kind regards,
Tom.