Giter Club home page Giter Club logo

nagios-for-i's Introduction

nagios-for-i

Description

Nagios provides enterprise-class Open Source IT monitoring, network monitoring, server and applications monitoring.
We provide several customized plugin for monitoring IBM i systems.
You could refer to the this link for more details.

The nagios plugin for i has two methods.

  • You can run the plugin with a daemon server to handle and dispatch the request to worker thread.
    You could start the daemon server by script server_start.sh.
  • You can also run the plugin without the server. Then every request will be handled by seperate processes. It would be more simple but consumes more resources.

The plugins suport to mornitor following martix

  plugin            martix
CPU Retrieve the CPU utilization for the entire system
SpecificJobCPU Retrieve the CPU usage for a specific job
DiskUsage Retrieve the disk usage status
DiskConfig Retrieve the disk health status
ASPUsage Retrieve the ASP usage percentage of the entire system
ActiveJobs Retrieve the number of active jobs on the system
BasicInfo Retrieve the basic information of an IBM i system
CurSignOnUsers Retrieve the number of users that currently log on to the system
LongRunSQL Retrieve the longest running SQL
Message Retrieve the messages from a specific message queue
SpecificMessage Retrieve the status whether a specific message ID is found in a specific message queue
PageFaults Retrieve the page faults
SubsystemJobs Retrieve job information in a specific subsystem
CustomSQL The user could leverage SQL services to create self-defined matrix
TempStorageJobs Retrieve top N jobs that have the most temp storage usage
DaemonServer Retrieve the daemon server status

Installation and upgrade

Nagios Core

For the version of Nagios Core, you could install the latest plugins by service pack in directory service pack.
You could take Nagios Plugin for IBM i Install and Configure Guidelines.txt for detail steps.

Nagios XI

The wizards for monitoring IBM i should be installed in the base shipment for Nagios XI (As of Jan 2021 this is not the case). To update or install the plugins you should do the following.

  • Download the Wizards and store locally
  • Open the web interface.
    • Select the Admin page
    • Select Manage Config Wizards (left hand column of links)
    • Select Browse to select the zip file
    • Select the Upload and Install button to install the Wizard

The wizards should now be available to monitoring the IBM i.

Information from Nagios about installing wizards which has a lot more information can be found here.

nagios-for-i's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nagios-for-i's Issues

Check the Partitions Status from IBM i

Hi

setting up the above using the HMC Plugin Service we receive HMC user profile not set, i note that there is no box to specify a user for the HMC user profile, as we would for SST or the ibm i. I have also followed Add a user profile for HMC # /bin/bash /usr/local/nagios/libexec/host_config.sh -i hmc but still see the issue, is there a fix available for this?

In addition we see in the HMC Plugin Service that the Management Console version, Systems and partitions tick boxes are grayed out for the monitored metric , Management Console Version, HMC Managed Systems , HMC Managed Partitions

Thank You

Error when adding an IBM i Host

Hi

I'm trying to add an IBM i host which can only be connected to via secure ports (947* range).

SSL/TLS has been configured successfully - required certificates added to the Nagios keystore.
This has been proven by completing the same process on an IBM i host that can be connected on unsecure ports (847* range).

When I complete the wizard (screen shot attached) it fails with the error:
Register profile error:
java.net.SocketTimeoutException: connect timed out
Insert host failed

Does anyone have any suggestions on how I can overcome this issue?

Thanks
Nagios XI - Add IBM i Host Error

Configure SSL for Host Connection

Please can someone point me in the direction of the instructions for creating the host connections to IBM i as Secure JDBC/SSL.
i.e. using the 947* range of ports rather than the 847* range.

I've looked everywhere but can't find how to do this.

Thanks

Build it

Hi !
I'm new to Java building ... How could I build this project from source, the simplest way ?
Couldn't find any project or build/make file ...
Any answer welcome :)

java.io.EOFException Insert Host Failed.

Hi

We are receiving the following error:
image
when trying to add out host.

Can you please advise where to look for the error logs to determine the root cause of this issue?

Many thanks

Marius

Host user profile not set

Good Morning,

May I ask what should we do to resolved this issue?

(No output on stdout) stderr: Host user profile not set

The error appears after I backup Nagios.host.java.config.ser because it is 0 byte.

Thanks

Status Unknown

Setting up the plugin for monitoring with Nagios XI, the plugin reported correctly for a couple days. After that time period all of the iSeries services being monitored went to a status of "unknown" with a status information reading "(No output on stdout) stderr: HostConfig-load(): java.io.EOFException: Unexpected end of ZLIB input stream"

If I remove the host and try to re-add it, I now get this error:

Register profile error:
java.io.EOFException: Unexpected end of ZLIB input stream
java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:240)
java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
java.util.zip.GZIPInputStream.read(GZIPInputStream.java:117)
java.io.ObjectInputStream$PeekInputStream.read(ObjectInputStream.java:2719)
java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2735)
java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:3212)
java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:895)
java.io.ObjectInputStream.(ObjectInputStream.java:357)
com.ibm.nagios.config.HostConfig.load(HostConfig.java:199)
com.ibm.nagios.config.HostConfig.Insert(HostConfig.java:126)
com.ibm.nagios.config.HostConfig.main(HostConfig.java:60)
Insert host failed

Java error setting up Nagios Plug-in for IBM i

Following error occured during setup of Nagios for IBMi (https://www.ibm.com/support/pages/node/1166188) step 3 for a IBMi lpar on the Nagios server:

[root@xxxxxxx nagios]# /bin/bash /usr/local/nagios/libexec/host_config.sh -i host
Input the host address(IP):XXXXXXXXX
Input the userID:YYYYYYYY
Input the password:
Confirm the password:
Exception in thread "main" java.lang.NoClassDefFoundError: com/ibm/as400/access/AS400
at com.ibm.nagios.config.HostConfig.Insert(HostConfig.java:113)
at com.ibm.nagios.config.HostConfig.main(HostConfig.java:82)
Caused by: java.lang.ClassNotFoundException: com.ibm.as400.access.AS400
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 2 more

Using nagios-plugin-for-IBM-i_20211112.tar on Nagios Core 4.4.14
tried to set $CLASSPATH to jar files, but still same result.....

How to fix this problem to add a IBMi lpar to Nagios server?

Tried to go larger than storage limit for object error when using plugin to look for messages

When using this plugin to monitor LPARs for message IDs CPF1164 and CPF1240 after about 24 hours the QZDASOINIT job the plugin is connecting to gets an error:

Tried to go larger than storage limit for object QGY_QZDASOINTQUSER_____
Function check. MCH2804 unmonitored by QGYOLMSG at statement *N. instruction X'0403

The actual jobnumber is listed where I put . This generates a DUMP that is is millions of lines long and endup in a MSGW due ti hitting our maximum record number for file.

We are calling the check with:
/usr/local/nagios/libexec/check_ibmi_status.sh -M SpecificMessage -H $hostname -I CPF1240,CPF1164

Service time out

We have IBMi LPAR being monitored by Nagios. every now and then we face the see the below issue. Please suggest

Notification details:
(Service check timed out after 91.01 seconds)

CustomSQL mix information when running checks

Hi.

I am currently checking/monitoring 2 services using the "CustoSQL" function. However, the information from one check is mixed with the other from time to time. For example, I have a CPU monitor and a message monitor that are defined under querys in the CustomSQL.xml file. When the CPU monitor does a check, it may return the correct CPU information or it may return the output of the message check query.

In my opinion, the solution could be to use various .xml files with the functions of each check and thus avoid combining information, but the plugin always points to /usr/local/nagios/etc/objects/CustomSQL.xml and does not allow using another path or different file.

Is there a way to solve it?

JDBC connection pool reset timer started

The check works fine - the status is working as intended (OK, warning and critical) but we're having an issue where the code itself from the plugin is returning the string of "JDBC connection pool reset timer started" so the status information just displays this string instead of (OK, Warning or Critical). Is there a work around this?

image

Exception - com.ibm.as400.access.ConnectionPoolException: Maximum configured number of connections has been reached.

Hi ,

Is there any way we can tune the max connection poll value from 100 to 200 maybe?

The error keep coming multple times a day and gone by it self yet it enough to annoy the engineering team. While on other system it only show 3 to 4 rows of connection.

image

if (pool == null) {
AS400JDBCConnectionPoolDataSource dataSource = new AS400JDBCConnectionPoolDataSource(system, userID, password);
dataSource.setSecure(true);
dataSource.setSocketTimeout(120000);////(60000 millisec == 1 min)- required when pool is trying to connect to a system that was shutdown after pool was opened.. in that case without timeout connection will hang
dataSource.setThreadUsed(false);
pool = new AS400JDBCConnectionPool(dataSource);
pool.setMaxConnections(100);
SecureJDBCPool.put(system, pool);

Thanks.

The nagios plugin for i has two methods.

Hi everybody,

the Readme tells the following:

...
The nagios plugin for i has two methods.

* You can run the plugin with a daemon server to handle and dispatch the request to worker thread.
   You could start the daemon server by script server_start.sh.
* You can also run the plugin without the server. Then every request will be handled by seperate processes. It would be more simple but consumes more resources.

...

Can someone give me a sample configuration for the two different methods so I understand the difference between the two?

Many thanks in advance.

register new IBM i host

I get the following when trying to add a new host

Exception in thread "main" java.lang.NoClassDefFoundError: com/ibm/as400/access/AS400
at com.ibm.nagios.config.HostConfig.Insert(HostConfig.java:113)
at com.ibm.nagios.config.HostConfig.main(HostConfig.java:82)
Caused by: java.lang.ClassNotFoundException: com.ibm.as400.access.AS400
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
... 2 more

New install of nagios from ova and followed instructions for installing the plugin.

Problems with class path

When running the host_config.sh script it errors

/bin/bash /usr/local/nagios/libexec/host_config.sh -i host
Input the host address(IP):sas3.shield.local
Input the userID:usr
Input the password:
Confirm the password:
Exception in thread "main" java.lang.NoClassDefFoundError: com/ibm/as400/access/AS400
at com.ibm.nagios.config.HostConfig.Insert(HostConfig.java:113)
at com.ibm.nagios.config.HostConfig.main(HostConfig.java:82)
Caused by: java.lang.ClassNotFoundException: com.ibm.as400.access.AS400
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 2 more

We had to update the script to add the jt400.jar to the class path for it to work. I think that is because you override the class path with the -cp option?
#!/bin/bash
java -cp /usr/local/nagios/libexec/jt400.jar:/usr/local/nagios/libexec/nagios4i.jar com.ibm.nagios.config.HostConfig $1 $2

application requester cannot establish the connection. (Connection refused (Connection refused))

I am trying to monitor an iseries and I am receiving an exception error on some of the monitors, but not all.

When I try ASPUsage I get:
Exception - com.ibm.as400.access.ConnectionPoolException: The application requester cannot establish the connection. (Connection refused (Connection refused))
com.ibm.as400.access.AS400JDBCConnectionPool.fill(AS400JDBCConnectionPool.java:360)
com.ibm.as400.access.AS400JDBCConnectionPool.getPooledConnection(AS400JDBCConnectionPool.java:501)
com.ibm.as400.access.AS400JDBCConnectionPool.getConnection(AS400JDBCConnectionPool.java:456)
com.ibm.nagios.util.JDBCConnection.getJDBCConnection(JDBCConnection.java:56)
com.ibm.nagios.service.impl.ASPUsage.execute)ASPUsage.java:39)
com.ibm.nagios.client.CheckIBMiStatus.main(CheckIBMiStatus.java:77)

However, If I try BasicInfo - it works and I get a response back.

Doubt

Hello *ALL ..

One doubt, I'm working in a client where NAGIOS is running, I can't check the configuration yet ... but when NAGIOS ask system any query NAGIOS takes too much CPU ... (I haven't time time to check or investigate yet)

I have found here https://github.com/cjt74392/check_as400 that user NAGIOS have at INLPGM initial program the RCLRSC command.

Can anyone explain why?

Thanks..

CPU Overload not Works!!!!

Hi everyone,

When use the command CPUOverloadJobs put the threshold -W 3.0 -C 4.0 for example but command not do it nothing.
somebody have the same problem with this command ?

[root@localhost libexec]# ./check_ibmi_status.sh -M CPUOverloadJobs -H 223.0.0.227 -W 3.0 -C 4.7
CPU overload job num: 0 (Warning: 3.0% Critical: 4.7%) | CPU overload job num = 0

CPUOverloadJobs always get 0.00%

Hi,

I created a simple CLP program to generate CPU load, but always get OK status.
I checked by running manually the SQL request found in Java code, I got correct ELAPSED_CPU_PERCENTAGE (280.2 actually).
While the "load generator" program was still running, i tried to re-launch the check command with "-W 0 -C 0", I got a list of all jobs, each showing a 0.00% CPU !
I tried some older versions of nagios4i.jar and jt400.jar, same result.
Any idea ?

Thanks for the good job by the way :)

Exception - java.lang.NumberFormatException: For input string: "8999999999999999999"

Hi ,

We have a check that we need to do for Journal Sequence Numbers to which can go to a large value. (e.g. 9999999999999999999),

if we add the check here to that value :

image

This error shows during check:

image

It looks like its the plugin that cannot handle the large value but we are not able to find where this large value resides, any help will be appreciated to see where we need to increase this value to accomplish the check.

Thanks

Register profile error

When attempting to add a new IBM i host I get this error

Register profile error:
java.io.IOException: Permission denied
java.io.UnixFileSystem.createFileExclusively(Native Method)
java.io.File.createNewFile(File.java:1014)
com.ibm.nagios.config.HostConfig.load(HostConfig.java:177)
com.ibm.nagios.config.HostConfig.Insert(HostConfig.java:125)
com.ibm.nagios.config.HostConfig.main(HostConfig.java:63)
Insert host failed

We're using Nagios XI 5.8.0

No X11 DISPLAY variable was set, but this program performed an operation which requires it.

I am using the ibmi plugin to check many iseries. Over the weekend I started getting the below error. We are using a centos 7 server to run the plugin. Other iseries work ok, its just one that is not working, very strange.

Here is my command:
./check_ibmi_status.sh -M ASPUsage -SSL n -H $ARG6$ -W 90 -C 95

I have tried setthing the DISPLAY variable, but that does not fix the issue.

Any ideas?

Unknown
(No output returned from plugin)
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:204)
java.awt.Window.(Window.java:536)
java.awt.Frame.(Frame.java:420)
java.awt.Frame.(Frame.java:385)
com.ibm.as400.access.ToolboxSignonHandler.displayMessage(ToolboxSignonHandler.java:336)
com.ibm.as400.access.ToolboxSignonHandler.passwordAboutToExpire(ToolboxSignonHandler.java:88)
com.ibm.as400.access.AS400.promptSignon(AS400.java:2956)
com.ibm.as400.access.AS400.signon(AS400.java:4246)
com.ibm.as400.access.AS400.connectService(AS400.java:1336)
com.ibm.as400.access.AS400JDBCConnection.setProperties(AS400JDBCConnection.java:3383)
com.ibm.as400.access.AS400JDBCDataSource.getConnection(AS400JDBCDataSource.java:706)
com.ibm.as400.access.AS400JDBCDataSource.getConnection(AS400JDBCDataSource.java:564)
com.ibm.as400.access.AS400JDBCConnectionPool.createPooledConnection(AS400JDBCConnectionPool.java:307)
com.ibm.as400.access.AS400JDBCConnectionPool.fill(AS400JDBCConnectionPool.java:344)
com.ibm.as400.access.AS400JDBCConnectionPool.getPooledConnection(AS400JDBCConnectionPool.java:501)
com.ibm.as400.access.AS400JDBCConnectionPool.getConnection(AS400JDBCConnectionPool.java:456)
com.ibm.nagios.util.JDBCConnection.getJDBCConnection(JDBCConnection.java:35)
com.ibm.nagios.service.impl.ASPUsage.execute(ASPUsage.java:39)
com.ibm.nagios.client.CheckIBMiStatus.main(CheckIBMiStatus.java:73)

[java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:204)
at java.awt.Window.(Window.java:536)
at java.awt.Frame.(Frame.java:420)
at java.awt.Frame.(Frame.java:385)
at com.ibm.as400.access.ToolboxSignonHandler.displayMessage(ToolboxSignonHandler.java:336)
at com.ibm.as400.access.ToolboxSignonHandler.passwordAboutToExpire(ToolboxSignonHandler.java:88)
at com.ibm.as400.access.AS400.promptSignon(AS400.java:2956)
at com.ibm.as400.access.AS400.signon(AS400.java:4246)
at com.ibm.as400.access.AS400.connectService(AS400.java:1336)
at com.ibm.as400.access.AS400JDBCConnection.setProperties(AS400JDBCConnection.java:3383)
at com.ibm.as400.access.AS400JDBCDataSource.getConnection(AS400JDBCDataSource.java:706)
at com.ibm.as400.access.AS400JDBCDataSource.getConnection(AS400JDBCDataSource.java:564)
at com.ibm.as400.access.AS400JDBCConnectionPool.createPooledConnection(AS400JDBCConnectionPool.java:307)
at com.ibm.as400.access.AS400JDBCConnectionPool.fill(AS400JDBCConnectionPool.java:344)
at com.ibm.as400.access.AS400JDBCConnectionPool.getPooledConnection(AS400JDBCConnectionPool.java:501)
at com.ibm.as400.access.AS400JDBCConnectionPool.getConnection(AS400JDBCConnectionPool.java:456)
at com.ibm.nagios.util.JDBCConnection.getJDBCConnection(JDBCConnection.java:35)
at com.ibm.nagios.service.impl.ASPUsage.execute(ASPUsage.java:39)
at com.ibm.nagios.client.CheckIBMiStatus.main(CheckIBMiStatus.java:73)]

Error finding classpath

When running the host_config.sh script it errors

/bin/bash /usr/local/nagios/libexec/host_config.sh -i host
Input the host address(IP):sas3.shield.local
Input the userID:usr
Input the password:
Confirm the password:
Exception in thread "main" java.lang.NoClassDefFoundError: com/ibm/as400/access/AS400
at com.ibm.nagios.config.HostConfig.Insert(HostConfig.java:113)
at com.ibm.nagios.config.HostConfig.main(HostConfig.java:82)
Caused by: java.lang.ClassNotFoundException: com.ibm.as400.access.AS400
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 2 more

We had to update the script to add the jt400.jar to the class path for it to work. I think that is because you override the class path with the -cp option?
#!/bin/bash
java -cp /usr/local/nagios/libexec/jt400.jar:/usr/local/nagios/libexec/nagios4i.jar com.ibm.nagios.config.HostConfig $1 $2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.