What is the best way for Java programs to monitor system health?

I hope to monitor my main system health indicators from within our Java based system The main points of interest include CPU temperature, motherboard temperature, fan speed, etc

Available packages:

Make this data available to Java? > Part time on windows or Linux or both? Is it open / free / cheap?

Solution

Both windows and Linux support MIB and expose the parameters you want to find through SNMP In addition, most major vendors have released special MIBs for their server hardware

I have implemented SNMP MIB and Java application monitoring using the commercial iReasoning SNMP API, and they work well There is also the open source snmp4j. I personally have no experience, but it looks good

Therefore, according to your needs, you will open the release of SNMP information of the host to be monitored No coding required This is just a configuration problem

For example, for CPU temperature, MIB lm-sensors-mib must be enabled Under Linux, you can use snmpwalk client to view oid. 1 3.6. 1.4. 1.2021. 13.16. 2.1. 3 look at the CPU temperature Once you do this, you know it publishes the data correctly, and you can start implementing a real monitoring solution

You can use the Java SNMP library to poll and subscribe to SNMP traps for hosts to monitor You can also use any commercial or open source monitoring tool (Google for SNMP console)

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>