Percona_template_for_cacti added support for redis multi-instance monitoring images, cactiredis
The cacti template of percona is still very handsome, but for multiple instances such as redis and memercache, only the default 6379 or one other port can be monitored (in short, all instances cannot be monitored ), this is a pity. To achieve monitoring of all objects that can be monitored, you must customize the template. After half a day of exploration, we finally achieved it. Let's take a look at the handsome one:
Steps:
1. Download The percona template and decompress it. Because the previous version was 1.0.1, it was modified based on the original version.
Wget http://www.percona.com/redir/downloads/percona-monitoring-plugins/1.0.1/percona-monitoring-plugins-1.0.1.tar.gz
2. Add the option port2 Based on the redis default template configuration file. When creating a redis monitoring image, you must enter the redis port number. If this parameter is left blank, the default port number is 6379, the ss_get_by_ssh.php script uses the port2 option to connect to the redis instance on the specified port:
Cd percona-monitoring-plugins-1.0.1/cacti/bin
Export bin./pmp-cacti-template \
> -- Script ../scripts/ss_get_by_ssh.php ../definitions/redis. def \
> -- Mpds port2> ../templates/cacti_host_template_percona_redis_server_ht_for_multi_instance.xml
Instructions for creating template scripts
Export bin./pmp-cacti-template -- help
Pmp-cacti-template generates a Cacti template from a definition file. For more
Details, please use the -- help option, or try 'perldoc pmp-cacti-template'
Complete documentation.
Usage: pmp-cacti-template <options> FILE
Options:
-- Cactiver Create templates for this Cacti version
-- Graph_height Height of generated graphs (default 120)
-- Graph_width Width of generated graphs (default 500)
-- Help Show this help message
-- Lint_check Complain about unused data found in the script
-- Mpds Comma-separated list of input method options to make
Per-data-source
-- Name_prefix Template name prefix (default Percona)
-- Poll_interval Polling interval (default 300)
-- Script Command-line script to use (required)
-- Smallint Create templates for 32-bit MySQL
-- Version Output version information and exit
Options and values after processing arguments:
-- Cactiver (No value)
-- Graph_height 120
-- Graph_width 500
-- Help TRUE
-- Lint_check FALSE
-- Mpds
-- Name_prefix Percona
-- Poll_interval 300
-- Script (No value)
-- Smallint FALSE
-- Version FALSE
➜ Bin
3. Import the newly created redis template cacti_host_template_percona_redis_server_ht_for_multi_instance.xml on the cacti web Management page.
Console-> Import/Export-> Import Templates-> choose file-> import
4. Modify the title of the image in the apsaradb for redis template to distinguish the image from the instance. This example uses the port number you entered when creating the image, and uses the variable in cacti | reference
Console-> Templates-> Graph Templates-> search 'redis 'and select a redis template-> in Graph Template title-> | host_description |-redis Commands-| input_port2 |-> save
5. Create a monitoring image for redis. Enter the port number.
6. If you have monitoring redis 6379 before importing a new template, the image display name is abnormal, for example, 192.168.0.19 _ Redis19-Redis Unsaved Changes-| input_port2 |, not 192.168.0.19 _ Redis19-Redis Unsaved Changes-6382
Datasource before modification
Console-> Create-> Data Sources-> search 'redis 'and select a data source-> in the Custom Data, let port2 = 6379-> save
7. The script refreshes the image display name.
Under the cacti server script directory:
[Root @ admin200 cli] # pwd
/Var/www/cacti/cli
[Root @ admin200 cli] # php-q poller_graphs_reapply_names.php-id = All-d-s = Redis
WARNING: Do not interrupt this script. Interrupting during rename can cause issues
DEBUG: There are '000000' Graphs to rename
DEBUG: Graph Name '2017. 168.0.19 _ Redis19-Redis Commands-192 'starting
DEBUG: Graph Rename Done for Graph '192. 168.0.19 _ Redis19-Redis Commands-100'
DEBUG: Graph Name '2017. 168.0.19 _ Redis19-Redis Connections-192 'starting
DEBUG: Graph Rename Done for Graph '192. 168.0.19 _ Redis19-Redis Connections-100'
DEBUG: Graph Name '1970. 168.0.19 _ Redis19-Redis Memory-100' starting
DEBUG: Graph Rename Done for Graph '192. 168.0.19 _ Redis19-Redis Memory-100'
8. OK. Refresh the web image and it will display normally. See the beginning of this article.
Set up cacti monitoring win2003 in linux. Only images are available for CPU, memory, and load without data. Other data is normal. How can this problem be solved?
CACTI monitors the WIN host and requires corresponding software to be installed on the WIN host. You also need to add the corresponding template in CACTI. It cannot be used directly by default.
How can monitoring images be transmitted to the Internet in a timely manner?
In practice, many organizations and families do not have fixed IP addresses. Most of them use ADSL to access the Internet. However, many friends need to implement remote monitoring. One of the topics that have been consulted recently is how to use the existing conditions of ADSL to achieve remote monitoring. Here, we take the TPLINKR860 router and the 804 compression card as an example to describe the dynamic domain name application and router setting method in detail:
1. Dynamic Domain Name application:
To access through remote, you must have a domain name that can be used, we are now using the TP-LINK410 router's built-in DDNS functions to apply for a dynamic domain name of their own:
1. Open the control interface of the vro: Enter 192.168.1.1 in the address bar. The logon dialog box on the control panel appears. The default username and password are all admin.
Www.pa360.cn/anzhuang/dtymdsq.htm
How to Implement Remote Monitoring Control Using Dynamic IP addresses
Before that, we have introduced "Assembling and debugging industrial-controlled DVR", "applying for dynamic domain names and setting vrouters ", here, we will only introduce the settings of the 804 and 808 series compression cards on the software control interface. For the setting methods of other compression cards, please refer to this document and the compressed card product manual.
We need to remind you that there is a professional "client" software in the Software Directory of the compression card, remote control and access can be achieved through the client software (refer to the user manual for client settings and usage ).
The following describes how to set up IE Remote Monitoring by using dynamic domain names in response to the requirements of large enterprises:
1. confirm that the hardware and software of the monitoring system are operating normally;
2. confirm that the dynamic domain name application is successful, the vro settings are normal, and the dnns in the vro has been connected successfully;
1. Confirm the ports to be opened by the monitoring software:
To achieve remote monitoring and control for any compression card, you must open the corresponding ports in the software and related hardware. Some software must be open many times, and some only need one. Generally, it will be indicated in the product manual. If not, we need to open the software and check the specific port number. Unless otherwise required, use the default port number:
Now, open the monitoring software, click "set", and then click "Network Management ":
Www.pa360.cn/anzhuang/dongtai-IP.htm