Here is a process you can use:
Follow this guide to install/setup the tool (ignore the title, this does what you want by adding extra data sources). It uses the OLD XML file and the OLD and NEW RRD files.
Code: Select all
https://support.nagios.com/kb/article/nagios-xi-icmp-and-ping-checks-stopped-graphing-149.html
Then install this in
Admin > Manage Components:
Code: Select all
https://exchange.nagios.org/directory/Addons/Components/Performance-Data-Tool/details
Then make a new temporary directory:
Code: Select all
mkdir /usr/local/nagios/tmp/TEMP_RRD_MERGE
chown -R apache.nagios /usr/local/nagios/tmp/TEMP_RRD_MERGE
Now put the NEW XML file and the OLD RRD file into
/usr/local/nagios/tmp/TEMP_RRD_MERGE (make sure they are named the same except the extension).
Run this after you'd done that and follow the instructions:
Code: Select all
cd /tmp
./fix_ds_quantity.sh -d /usr/local/nagios/tmp/TEMP_RRD_MERGE
It should say something like:
Are you sure? (y/n) y
Batch job confirmed by user.
Batch process started at Fri Jul 10 14:14:40 CDT 2020
Populating list of RRDs from the dircetory: /usr/local/nagios/tmp/TEMP_RRD_MERGE/
Backing up: /usr/local/nagios/tmp/TEMP_RRD_MERGE/Disk.rrd
Fixing permissions for file: /usr/local/nagios/tmp/TEMP_RRD_MERGE/Disk.rrd
/usr/local/nagios/tmp/TEMP_RRD_MERGE/Disk.rrd updated with 6 additional datasource(s)
Batch job finished at Fri Jul 10 14:14:48 CDT 2020.
A total of 1 file(s) were updated with a total of 6 datasource(s).
Now remove the XML file, leave the OLD (now updated) RRD file in there, and put the NEW RRD file into
/usr/local/nagios/tmp/TEMP_RRD_MERGE (rename one of them if you need).
Run this after you've put them in there:
Code: Select all
chown -R apache.nagios /usr/local/nagios/tmp/TEMP_RRD_MERGE
Now go to Admin > Manage Components > Performance Data Tool > Options:
- Enter
/usr/local/nagios/tmp/TEMP_RRD_MERGE
- Select "Folder containing Performance Data Files" from the Type dropdown
- Check the box next to it
- Click Apply Settings
Now click the Tools menu item in the very top menu bar:
- Under "Tools by Box293", click
Performance Data Tool
- Click the Merge tab
- Select Mere Specific .rrd's
- Select the
/usr/local/nagios/tmp/TEMP_RRD_MERGE from the Source Dropdown
- Select the OLD.rrd
- Select the
/usr/local/nagios/tmp/TEMP_RRD_MERGE from the Destination Dropdown
- Select the NEW.rrd
- Click Perform Action
- Click the OK button on the popup and wait a few seconds and you'll see the merge operation show up below
- Click the Perform Merge button
- It should pop up a window showing the merge operation, you should OK as the output once it's done.
Now take the NEW RRD file from /usr/local/nagios/tmp/TEMP_RRD_MERGE and replace the one (
rename it so it matches exactly) in
/usr/local/nagios/share/perfdata/YOURHOSTNAME/.
Now go check the graphs to see if they show the merge data as well as the new data.