Zabbix Monitoring Windows Process restart

Source: Internet
Author: User

Some time ago, a friend consulted me on how to monitor the restart of the Windows process. The production environment has a monitoring process of start-up and shutdown, but reboots have not been thought of. After some thinking and groping successfully completed the monitoring, the following monitoring ideas and methods to share to everyone.

The first thing I think about is the process number monitoring (proc.num) that comes with Zabbix, but there are two difficulties: first, the number of processes changed from 1 to 0 and then 1, which is a reboot. Trigger to judge three consecutive monitoring data, not very good to do; second, the process from the shutdown to the next start, how long is the intermediate interval a reboot?

Then think of the ZABBIX monitoring operating system restart, such as the trigger of Windows system restart: {Template OS Windows:system.uptime.change (0)}<0,zabbix is determined by monitoring the system run time, That is, the system runtime changes less than 0 can be concluded that the server restarted. Again, if we monitor the run-time of the process, the restart is a good judge.

The next step is to monitor how long the Windows process is running. Think of Zabbix native support for monitoring Windows performance counters (Windows Performance Monitor), you can find out if there is monitoring of the process runtime from within Windows Performance Monitor. Log in to a Windows Server 2008 server, go up and look at the Performance Monitor, and find it, see:

650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M02/96/BF/wKioL1klGrTgRb43AAGrAlpJ8eM644.png-wh_500x0-wm_ 3-wmp_4-s_1266831990.png "title=" 1.png "alt=" Wkiol1klgrtgrb43aagralpj8em644.png-wh_50 "/>

The "Elapsed time" is found in the process category, which is the meaning of the total running times. Select a process from the following column (for example, Zabbix_agentd, without the. exe suffix).

Once added, right-click on "Properties":

650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M02/96/BE/wKiom1klGuzC5z1QAAAz7F6QKCg286.png-wh_500x0-wm_ 3-wmp_4-s_4000984218.png "title=" 2.png "alt=" Wkiom1klguzc5z1qaaaz7f6qkcg286.png-wh_50 "/>

You can see that the counter we just added is:\process (ZABBIX_AGENTD) \elapsed time

650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M00/96/BE/wKiom1klGwWwNFkzAADGEDPW4go666.png-wh_500x0-wm_ 3-wmp_4-s_4294421823.png "title=" 3.png "alt=" Wkiom1klgwwwnfkzaadgedpw4go666.png-wh_50 "/>

Exit settings, and then view the counter's data, the process currently runs for 14,349,806 seconds:

650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M00/96/BF/wKioL1klGzHCz2yOAADtxh2g8W0200.png-wh_500x0-wm_ 3-wmp_4-s_618326459.png "title=" 4.png "alt=" Wkiol1klgzhcz2yoaadtxh2g8w0200.png-wh_50 "/>

Restart the process Zabbix_agentd, and then look at the latest count starting from 0:

650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M01/96/BE/wKiom1klG06Q3EsYAAAV5SBccAA566.png-wh_500x0-wm_ 3-wmp_4-s_200081473.png "title=" 5.png "alt=" Wkiom1klg06q3esyaaav5sbccaa566.png-wh_50 "/>

Method found , we create a monitoring item and a trigger. Blog Address: http://qicheng0211.blog.51cto.com/

Create a monitoring entry first:

650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M00/96/BF/wKioL1klG5igLvl2AAFJviy7PL8131.png-wh_500x0-wm_ 3-wmp_4-s_2956208003.png "title=" 6.png "alt=" Wkiol1klg5iglvl2aafjviy7pl8131.png-wh_50 "/>

Monitoring Item Name: ZABBIX_AGENTD Process Run time

Monitoring item Type: Zabbix Agent

Monitoring key:perf_counter["\process (ZABBIX_AGENTD) \elapsed time"]

Data type: Float

Unit: S

Monitoring interval: 30

Note: The Perf_counter parameter is the performance counter added above.

To create a trigger:

650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M02/96/BF/wKioL1klG7GQ8qzPAADENYlMhhM484.png-wh_500x0-wm_ 3-wmp_4-s_3775184160.png "title=" 7.png "alt=" Wkiol1klg7gq8qzpaadenylmhhm484.png-wh_50 "/>

Trigger Name: ZABBIX_AGENTD Process Restart!

Trigger expression:{windows.60.61:perf_counter["\process (ZABBIX_AGENTD) \elapsed Time"].change ()}<0

Expression meaning: The trigger fires when the difference between the monitoring item's latest monitoring data and the previous data is less than 0.

Let's test to see if the alarm is generated after restarting the process:

650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M00/96/BF/wKiom1klG93gzBvgAAD8VFTIoTU288.png-wh_500x0-wm_ 3-wmp_4-s_1915317560.png "title=" 8.png "alt=" Wkiom1klg93gzbvgaad8vftiotu288.png-wh_50 "/>

Wait a moment, the trigger is successfully triggered and the trigger state lasts for 30 seconds.

650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M02/96/BF/wKiom1klG_bAEUdjAACBpY5Y-dw813.png-wh_500x0-wm_ 3-wmp_4-s_2421563041.png "title=" 9.png "alt=" Wkiom1klg_baeudjaacbpy5y-dw813.png-wh_50 "/>

This is where our monitoring of Windows process restarts is complete.

Original articles, reproduced please indicate the source, respect the achievements of Bo Master labor, thanks.

This article is from the "Start Linux blog" blog, make sure to keep this source http://qicheng0211.blog.51cto.com/3958621/1928947

Zabbix Monitoring Windows Process restart

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.