zabbix监控jar进程的状态,CPU内存占用--自动发现
被监控主机的/data/sh/目录下创建监控his进程状态CPU和内存的脚本:
[root@gys-jiangjingxin-test-105 ~]# ps -ef|grep java
root 102517 102450 0 14:21 pts/0 00:00:00 grep --color=auto java
root 214824 1 0 Feb16 ? 00:29:24 java -Xms2048m -Xmx2048m -jar /data/his/jar/his-app-1.0.4.jar --spring.config.location=/data/his/config/his/bootstrap.yml --spring.profiles.active=prod
root 339761 1 0 Feb17 ? 00:16:56 java -Xms512m -Xmx512m -jar /data/his/jar/his-config-1.0.0.jar --spring.config.location=/data/his/config/config/bootstrap.yml
root 752961 1 0 Feb11 ? 00:25:53 java -Xms512m -Xmx512m -jar /data/his/jar/his-eureka-1.0.0.jar --spring.config.location=/data/his/config/eureka/application.yml
root 753533 1 0 Feb11 ? 00:25:33 java -Xms1024m -Xmx1024m -jar /data/his/jar/his-gateway-1.0.2.jar --spring.config.location=/data/his/config/gateway/bootstrap.yml --spring.profiles.active