Home IT Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ How to merge two pictures in Cacti     - MySQL and MariaDB traditional master-slave cluster configuration (Database)

- Java multi-threaded communications pipeline flow (Programming)

- Let Markdown code syntax highlighting and support Django1.6 (Linux)

- 64 Ubuntu 15.04 Linux kernel upgrade to Linux 4.1.0 (Linux)

- Ubuntu 14.04 How to install Cinnamon 2.4.5 (Linux)

- Ubuntu install Oracle 10g process and problem solution (Linux)

- RHEL 6.5 KVM analytical use (Server)

- Ubuntu How to install and upgrade Linux Kernel 3.15 (Linux)

- To install GCC development environment under SUSE11 (Linux)

- Ceph tuning --Journal and tcmalloc (Server)

- Depth understanding of C language (Programming)

- Ubuntu system process is bound CPU core (Linux)

- Linux AS4 VPN server in conjunction with a firewall perfect (Linux)

- Java Concurrency -volatile keywords (Programming)

- Using DOS command to change UNIX administrator password (Linux)

- Create a DLL using MinGW and Attention (Programming)

- The traffic monitoring system: cacti (Linux)

- How to use the Linux terminal Git commands (Linux)

- 10 Codes of good practice PHP (Programming)

- OpenCV cvFindCornerSubPix () to find sub-pixel Corner (Programming)

  How to merge two pictures in Cacti
  Add Date : 2018-11-21      
  Cacti is a great open source network monitoring system, which is widely used for the graphical display of network elements, such as bandwidth, storage, processor, and memory usage. Use its Web-based interface, you can easily create and organize a variety of charts. However, it does not default to provide some advanced features, such as merge pictures, graphics create an aggregate using multiple sources, Cacti migrated to another server. Cacti use these functions you need some experience. In this tutorial, we'll see how the two will be merged into one picture Cacti.

Look at this example. In the past six months, the client A is connected to Switch A port 5. Port 5 error occurred, so the client moved to port 6. Since Cacti for each interface / element with a different view of the history of the bandwidth will be divided into client ports 5 and 6. The results for a client we have two pictures - one is six months old data, and the other one holds the following data.

In this case, we can actually merge the two images of the old data to the new figures, so that with a single picture shows a user the preservation of historical and new data. This tutorial will explain how to do this.

Cacti will each picture data is stored in its own RRD (round robin database, circulation database) file. When requesting a picture, save in accordance with the corresponding values ​​in RRD files generated map. In Ubuntu / Debian systems, RRD files are stored in / var / lib / cacti / rra, in CentOS / RHEL systems is / var / www / cacti / rra.

Thinking behind the merger is to change the image of these old RRD RRD files such values ​​in the file can be appended to the new RRD file.


A client service operation for more than a year on eth0. Due to hardware damage, client migration to the eth1 interface to another server. We want to show the bandwidth of the new interface, while retaining the historical data for over a year. The client wants only displayed in a diagram.

OK graph RRD files

The first step is to determine the merger FIG diagram associated with the RRD files. We can check by opening the file in debug mode in FIG. To do this, the Cacti menu: Console> Management Figure> Select Figure> Open Graph debug mode.

From the sample output (Debian based system), we can determine the two pictures of RRD files:

Old Figure: /var/lib/cacti/rra/oldgraphtrafficin8.rrd
New Figure: /var/lib/cacti/rra/newgraphtrafficin10.rrd
Preparation Script

We will use a script to merge two splice RRD RRD files. Download the PHP script to install /var/lib/cacti/rra/rrdsplice.php (Debian / Ubuntu systems) or /var/www/cacti/rra/rrdsplice.php (CentOS / RHEL system).

Next, make sure the Apache user who owns the file.

In Debian or Ubuntu system, run the following command:

# Chown www-data: www-data rrdsplice.php
And update rrdsplice.php. Look for the following line:

chown ($ finrrd, "apache");
Replace with the following statement:

chown ($ finrrd, "www-data");
In CentOS or RHEL system, run the following command:

# Chown apache: apache rrdsplice.php
Merge two plans

Through without any parameters to run the script can get the script syntax.

# Cd /path/to/rrdsplice.php
# Php rrdsplice.php
USAGE: rrdsplice.php --oldrrd = file --newrrd = file --finrrd = file
Now we are ready to merge the two RRD files. Only you need to specify the name of the old file and the new RRD RRD files. The results of our combined rewritten to a new RRD file.

# Php rrdsplice.php --oldrrd = old_graph_traffic_in_8.rrd --newrrd = new_graph_traffic_in_10.rrd --finrrd = new_graph_traffic_in_10.rrd
Now data from the old RRD files have been added to the new RRD file. Cacti any new data will be written to the new RRD file. If we click on the map, we can see also has added a week old chart, month and year record.

In summary, this tutorial shows how simply two Cacti pictures merged into one. When the service moved to another device / interface, we only want to deal with a picture instead of two when the tips very useful. The script is very convenient because it can regardless of the source device is not the same image can be combined, for example, Cisco 1800 routers and Cisco 2960 switches.

I hope this can help you.
- Shilpa Nair interview experience sharing RedHat Linux package management (Linux)
- Attic-- delete duplicate data backup program (Linux)
- Ubuntu 14.04 jdk Installation and Configuration (Linux)
- Linux iptables firewall settings (Linux)
- The Linux disguised as windows to make the system more secure (Linux)
- Let Linux boot methods to enter characters interface and set FrameBuffer resolution methods (Linux)
- How to create SWAP files in Ubuntu 14.04 (Linux)
- tespeed - test speed of Python tools (Linux)
- Linux Firewall Basics (Linux)
- Oracle ordinary users show parameter method (Database)
- Android Studio Personalization (Linux)
- Vagrant failed to start, stuck in Waiting for VM to boot solution (Linux)
- Bash difference in single quotes and double quotes (Programming)
- Without Visual Studio .NET Windows application development (Programming)
- shell script: a key to install LAMP, LNMP script (Server)
- Git common skills (Linux)
- Linux data recovery software efficiently practical application extundelete (Linux)
- Linux file and directory permissions settings (Linux)
- Retro terminal in Linux (Linux)
- KVM virtualization nested configuration (Server)
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.