IBM i Global

 View Only
  • 1.  Questions about Nagios plugin for IBMi

    Posted Wed March 20, 2024 03:53 PM

    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.

    Nagios testservers.JPG

    Hopefullly I described the problem clearly enough. If not please respond. Thanks in Advance.



    ------------------------------
    Tom Smit
    ------------------------------


  • 2.  RE: Questions about Nagios plugin for IBMi

    Posted Thu March 21, 2024 05:44 AM

    Hi Tom,

    Does the OS are the same and have the same PTF level ?

    Regard's



    ------------------------------
    Virgile VATIN
    ------------------------------



  • 3.  RE: Questions about Nagios plugin for IBMi

    Posted Thu March 21, 2024 06:47 AM

    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
    ------------------------------



  • 4.  RE: Questions about Nagios plugin for IBMi

    Posted Thu March 21, 2024 07:01 AM

    In V7R5 Security is enforced (wrksysval QSECURITY), may your trouble is related to security, i don't know why the message is related to DCM, have you try to connected to DCM and login on the web page ? 

    May be you can find a log which give you more information on this error ?



    ------------------------------
    Virgile VATIN
    ------------------------------



  • 5.  RE: Questions about Nagios plugin for IBMi

    Posted Mon September 23, 2024 01:24 PM
    Hi Tom,
    Unfortunately, the "Disk Config" service is no longer supported in 7.5 and there are no plans right now to replace it since the Nagios for i project is not being fully supported. If you did switch to Nagios XI, like was suggested, you'd hit the exact same problem. Depending on your use case, you may be able to use the SYSDISKSTAT view to achieve the same result. You would just need to create a custom SQL service and then run something like:
     
    SELECT ASP_NUMBER, RESOURCE_NAME, RESOURCE_STATUS, HARDWARE_STATUS from qsys2.sysdiskstat where (RESOURCE_STATUS != 'ACTIVE' OR HARDWARE_STATUS != 'ACTIVE')
     
    That would let you monitor for any disk units that were not active. However, depending on your specific implementation, this may not work as a one-to-one replacement.


    ------------------------------
    Andrew Holman
    ------------------------------



  • 6.  RE: Questions about Nagios plugin for IBMi

    Posted Wed August 21, 2024 05:03 AM

    Tom, 

    Do you really need to use Core only for Nagios ?

    There is a wonderful wizard in Nagios XI that can assist with the config much easier (especially for a few IBM i's), yes you do pay for some support but up to if I recall correctly Nagios XI is free for less than 10 hosts. 

    https://www.nagios.com/solutions/ibm-i-monitoring/

    https://www.ibm.com/support/pages/setting-nagios-plug-ibm-i 

    as for some paid options (which I feel is reasonably priced for what you are getting for Critical Monitoring) : 

    two vendor options exist : 

    https://www.shieldadvanced.com/Blog/product-announcement-aag-nagios-monitoring-for-ibm-i/

    https://www.m81.eu/products/EN/Products/Control%20for%20i/Control%20For%20i,%20EN,%20Documentation,%20V3.24.pdf 

    HTH



    ------------------------------
    Marius le Roux
    Owner
    MLR Consulting
    ------------------------------



  • 7.  RE: Questions about Nagios plugin for IBMi

    Posted Tue September 24, 2024 01:01 PM

    Thanks to Marius for this introduction to our monitoring product 'Control for i' ! 

    Thats right, the main strength of 'Control for i' is that it INTEGRATES the IBM i into your EXISTING monitoring tool (such as Nagios, Shinken, PRTG, SolarWinds, Pandora, Zabbix and many others).  With 'Control for i' you can monitor ALL your IT platforms (including IBM i) from YOUR unique enterprise solution.

    'Control for i' adds to it more than 180 plug-and-play controls / checks / probes to monitor Messages, Applications, Backups, HA, ERPs, EDI, Hardware, Systems, Databases, Batchs, Middlewares, Transfers, Logs, ...

    You don't need to develop ANY line of code, just setup the IBM i commands provided by Control for i... test it ... and then just copy/paste the command and its parameters into Nagios (or any other tool) and that's it : Nagios is able to control your IBM i.

    Hundreds of IBM i LPARS are monitored worldwide with 'Control for i' including End-user companies but also Cloud providers and MSP.

    Another IBM TechXchange community question has received lot of answers (including from some of our users who love our solution): https://community.ibm.com/community/user/power/discussion/monitoring-and-alerting-tool-for-ibmi?ReturnUrl=%2fcommunity%2fuser%2fpower%2fcommunities%2fcommunity-home%2fdigestviewer%3fListKey%3d5f3ae1c4-abd1-45bd-bf1a-a68e4a87baec



    ------------------------------
    Bruno Taverne
    ------------------------------