this point, we may need to customize it.
As mentioned in the previous article. There are two main cacti data collection methods:
Data Queries is mainly a defined XML file.
Data input methods is mainly scripts and command (most commonly used)
The detailed process of monitoring by using the cacti custom monitoring script is as follows:
Custom Data collectio
The WinPE system provides three ways to start custom scripts: Winpeshl.ini, Startnet.cmd, and Unattend.xml. The default interface for WinPE is the command Prompt window. However, you can create a custom Winpeshl.ini file to run your own shell application. You can also create your own Startnet.cmd batch file to run a specific set of commands, batch files, or
: [External scripts] instead of [External script]4. Restart Nsclinet5. The directory where the monitored end Check_nrpe is located (the CentOS default installation directory is:/usr/lib64/nagios/plugins/)./check_nrpe-h hostip-c Check_runNote :-H after the script just before the machine,-C after the write command, which corresponds to the Check_run in the configuration fileIf the results are consistent with expectations, then you can continue to confi
crash container data: Crashed_function execution results are as follows: 2 Host A, get the collected letters on Host B Interest
#cd/var/www/html/cacti/scripts
#vim testdocker.sh
Running result: ps:host for monitored host ip:192.168.24.231 3 custom Data Input Method (1) console->collection methods->data Input Meth Od->add PS
where
Input Type should select Script/command becau
This article mainly introduces in detail the parsing of Custom Attributes of html elements processed by JavaScriptJs scripts (which is compatible with Firefox and IE). For more information, see, we hope to help you with HTML elements, which are rich in attributes. However, in some cases, it may be too slow. At this time, Custom Attributes play a key role.
It is
custom control, write"[Assembly:System.Web.UI.WebResource (" TestControl.JavaScript.js "," Text/javascript ")]" such as:Note: TestControl.JavaScript.js in TestControl is the name of the folder where JS is located, because my assembly's default namespace is empty, so here is TestControl.JavaScript.js. If the default named control is not empty, it should be added. The format is: the default named Control. JS is located in the folder name. js file name.
Tags: cacti custom monitoring template The templates provided by cacti are often unable to meet our monitoring needs. At this time, we are required to customize monitoring to meet our actual monitoring needs. The following is a simple case, you can simply learn the process.
Write a script to monitor the number of client connections of the Wireless AP.Place the script in Note: The output format of the script is clients: XXXX.
Add Da
Functions are often used when writing programs, and general development tools have a rich library of functions. But sometimes you need to customize the function to meet our needs.In Linux, the same is true for shell scripts, which sometimes use custom functions.The simplest definition of a function is a set of command sets or statements that form an available block called a function.1. Define the format of
) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/7F/AC/wKiom1coYD2hh1KAAABT2NgQK1g528.png "title=" 10.png "alt=" Wkiom1coyd2hh1kaaabt2ngqk1g528.png "/>Create a trigger by clicking TriggerEnter a nameExpression: {host_1:inform_queue.min (1m)}>3Represents more than 3 in the last 1 minutes of the queue then the trigger expression will return trueSelect severity, click Update650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/7F/AC/wKiom1coZOeCJUayAAA56NJiOt8491.png "title=" 13.png "al
Need to start multiple MySQL instances on the server todayThe new MySQL instance can not be managed with mysqld_multi, so it has customized a mysql_3307 service, with service managementYou can look at the service code, which are simple shell scripts.The principle of service is to go to/etc/init.d to find the corresponding service script, and then invoke the script, the service's second parameter is passed to the invocation of the services as the first parameterTherefore, you can write a script u
This paper mattered meters alongThis address: http://blog.csdn.net/sushengmiyan/article/details/50534361We all know that we can use Hibernate's metadata metadata to generate the table structure, but in general, we just rely on hibernate automatic generation is not enough, we look forward to using their own SQL script, you hibernate automatically execute that script can. So hibernate support does not support it? The answer is yes! .We only need to do the following settings:Explain the following:
Write a script named: autostart.sh, placed in the/etc/init.d/directory, give permission chmod +x/etc/init.d/autostart.shThe code is as follows#!/bin/sh#chkconfig:2345 #description: Autostart server Daemon#shell script Body Custom # ..... start ..... stop, ..... ..... ..... restart .... ....In this case, the service command can be used to see if CHKCONFG can be usedEnter/etc/rc.d/init.d/chkconfig--list autostart//If the service Autostart supports ....-
Check_disk (on server)If normal, it will output a row of disk detection data, or may be error.cd/etc/nagios/conf.d/Vim 192.168.0.12.cfg (your IP address name) # Add the following: Define host{ use linux-server host_name 192.168.0.12 alias 0.12 address 192.168.0.12 } Define Service{Use Generic-serviceHOST_NAME 192.168.0.12Service_description Check_diskCheck_command Check_nrpe!check_diskMax_check_attempts 5Normal_check_interval 1}Continue adding servicesVim/e
Error:/usr/local/bin/stop.sh:line 3: [: 2151:unary operator expectedReason:The shell script name is stop_tomcat.sh and will never be executed else because the script itself contains the Tomcat,shell script to find out Stop_tomcat This process is the first grep after the content (Tomcat) is not unique, will find a number of PID #!/ Bin/bash #shell脚本中第一行必须写pid = ' Ps-ef|grepTomcat|grep-v Grep|awk ' {print $} ' if [$pid]thenkill-9 $pidecho ' mysql is stopped ... ' Elseecho ' MySQL is not running. .
Need to start multiple MySQL instances on the server todayThe new MySQL instance can not be managed with mysqld_multi, so it has customized a mysql_3307 service, with service managementYou can look at the service code, which are simple shell scripts.The principle of service is to go to/etc/init.d to find the corresponding service script, and then invoke the script, the service's second parameter is passed to the invocation of the services as the first parameterTherefore, you can write a script u
Zabbix Monitor nginx,php-fpm and MySQL memory usage and number of processes with custom scriptsFirst, add a script under the Zabbix script directory and write the following code#!/bin/bash#license: GPL#mail: [Email protected]#date: 2015.04.16Top-bn1>/usr/local/zabbix-2.4.4/scripts/process.logLog=/usr/local/zabbix-2.4.4/scripts/process.logPHP_FPM () {grep "PHP-FPM
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.