Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to realize the thold plug-in Sound alarm function of cacti

Shulou Source: shulou.com Published: 2022-06-03 04:50:04 10月04日 Update

How to realize the sound alarm function of cacti's thold plug-in? I believe that most people have not yet learned this skill, in order to let you learn, to give you a summary of the following content, do not say much, let's move on.

1. For example.

First, copy the sounds folder of monitor to the thold path.

Then modify the thold_graph.php file.

Modify here to add $temp=0; (near 500th line).

Add $clock0; $item0; $temp=0;##

2. Modify here and add $temp=1; (more than 500lines), which means that the alarm at the warning level will sound. Of course, you can also modify other levels, such as red.

Case THOLD_SEVERITY_WARNING: $bgcolor = 'warning'; $temp=1;## add break in this line

3. Modify here and add if ($temp = = 1) {.}; (about 650 lines). Loop=false means that the page will be played every time it is refreshed, otherwise the loop will continue.

Form_end_row ();} # # add if ($temp = = 1) {print';} in the line below

This can be used directly, as long as the thold page has a warning-level alarm, it will sound. (the thold page does not refresh automatically, it can be automatically refreshed by modifying the php code or by using browser settings)

About cacti's thold plug-in voice alarm function to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Tags: Levels pages features sounds plug-ins content files more yes loops code can be passed most skills folders articles browsers look knowledge Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Apple vpn Shulou Information Docker