n00badmin / mirage

Mirage is a Cacti plugin designed to mirror SNMP polling data to file.
MIT License
10 stars 1 forks source link

How to put Graph Name in Mirage Output Log File. #4

Open Nad-Java opened 7 years ago

Nad-Java commented 7 years ago

Hi, Can anyone help me out to put the Graph Name in mirage output log file, i tried "name_cache" in polling.php but unable to figure out the correct syntax to output the graph name along with other KV paris. My goal is to export the Traffic usage from Cacti Graphs to log file and then import these to DB for analysis. Also little help required with rrdv(rrd_value) for rrdn "traffic_in" & "traffic_out". Is it Bits or Bytes or ?

n00badmin commented 7 years ago

Hi Nad-Java,

I recommend checking out the Cacti db to help map some of the items you are looking into: http://docs.cacti.net/_media/manual:087:cacti_database_schema_0.8.7i.pdf

Then check out the query we used in Splunk to create a lookup table to match up against the KV pairs:

https://github.com/mennova/Splunk_TA_Cacti/blob/master/bin/cacti_lookup_mirage.py

This will query the cacti db for down fields to enrich the log.

{cacti,"local_data_id","name_cache","host_id",hostname,ip,"data_source_type_id"}

You could add more that you are interested to the scripted query.

The bits/bytes depends on the graph template selected...you can confirm in the DB tables or in Cacti gui

n00badmin commented 6 years ago

Hey @Nad-Java, we have gotten around to updating the plugin to put the graph name in the output. Lemme know if you are still interested in having a look.