Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Zabbix automatic Discovery Monitoring tomcat Health Page

2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Zabbix automatic Discovery Monitoring tomcat Health Page

I. background

The company's system platform has more than 10 tomcat services. Due to the need for the service to maintain uninterrupted service throughout the year, a special monitoring page is embedded in tomcat. When the return value of the special curl page is 200, the service is determined to be running normally, otherwise the alarm will be sent to the mailbox of the special monitoring operation and maintenance staff.

Second, principle

The normal tomcat health monitoring page is shown below

We use the following command to determine whether the return value is 200

Shell > / usr/bin/curl-o / dev/null-s-connect-timeout 5-w'% {http_code} 'http://10.0.0.107:9100/sms-app/health

If the returned value is not 200, it is determined that the service is abnormal and the alarm will be given.

3. The specific auto-discovery operations are deployed as follows

1. First define the URL that needs to monitor the automatically discovered tomcat.

The following content

1. Cat > / etc/zabbix/WEB.txt / dev/null 2 > & 1#/usr/bin/curl-o / dev/null-s-w% {http_code} http://$1/ web_site_discovery () {WEB_SITE= ($(cat / etc/zabbix/WEB.txt | grep-v "^ #")) printf'{\ n' printf'\ t "data": [\ n'for

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report