Cacti Plugin : Scheduling RRD Export

Pattapong J.
NoteWise
Published in
2 min readMar 17, 2016

This plugin will export rrd file to text format to use in another system. It let’s you create a schedule then add datasources to each schedule.

I want to export data from cacti to Splunk. After some research I found mirage plugin however mirage export data from every datasource and every poll period. This create a lot of performance issue because my system have a few ten of thousand poller. I just want to export some of them and don’t need it realtime, once a day or a week should be enough. So, that’s a purpose of this plugin.

Source code: https://github.com/TheGU/cacti_rrdexport

Features

  • Mirror poller collection to logfile
  • Custom output log path
  • Output poller data in KV pairs (key-value pairs)
  • Enable logfile rotation
  • Enable Mirage Debug logs (writes to cacti.log)

Prerequisites

Dev and Test on :

  • Cacti version 0.8.8+
  • PIA version 3.1

Installation

setup plugins

  • Copy file into /<CACTI_ROOT>/plugins/rrdexport/
    make sure that folder name after plugins is rrdexport and store file in it
  • Install rrdexport through Cacti Plugin Management
  • Go to Cacti Setting page then RRD Export Schedules.
    Review log path and save
  • Make sure both log path in setting and /<CACTI_ROOT>/plugins/rrdexport/ are writable.
  • Enable rrdexport pluging through Cacti Plugin Management

setup schedules job

  • Go to Management > RRD Export Schedules
  • Add or edit new schedule
  • Add associate data source to schedule.

Screenshot

scheduler overview
setup scheduler
Select Datasource to associated with scheduler

--

--