migrating data history from MRTG to CACTI
Moderators: Developers, Moderators
migrating data history from MRTG to CACTI
Hi,
I used to work on MRTG and now want to migrate to cacti, I have set it up and is is running perfectly.
The problem is that I have old MRTG log files that contain data from the past two years.
How can I migrate this data to cacti.
I know I can change the log files to rrd files, but in cacti, for eache interface there is two rrd files, one for inbound and one for outbound traffic. while there is only one rrd file for the MRTG that contains both inbound and outbound traffic.
What should I do, If I cant Migrate the history, then I can't use cacti.
Please Advice.
All of my traffic is cisco routers, and there are more than 600 nods I am currently monitoring.
Thanks.
Omar
I used to work on MRTG and now want to migrate to cacti, I have set it up and is is running perfectly.
The problem is that I have old MRTG log files that contain data from the past two years.
How can I migrate this data to cacti.
I know I can change the log files to rrd files, but in cacti, for eache interface there is two rrd files, one for inbound and one for outbound traffic. while there is only one rrd file for the MRTG that contains both inbound and outbound traffic.
What should I do, If I cant Migrate the history, then I can't use cacti.
Please Advice.
All of my traffic is cisco routers, and there are more than 600 nods I am currently monitoring.
Thanks.
Omar
There is no way (to my knowledge) to make rrdtool read MTRG .log files directly. I know that MRTG is able to convert .log files to .rrd files though. I am not sure how to do this off the top of my head, but I know it can be done. I would check the MRTG/rrdtool documentation for more information about that.
Once you have the .rrd files, you can simply add them into cacti by specifying the full pathname and a data source name of 'ds0' and 'ds1' (incoming/outgoing data).
-Ian
Once you have the .rrd files, you can simply add them into cacti by specifying the full pathname and a data source name of 'ds0' and 'ds1' (incoming/outgoing data).
-Ian
I have imported the MRTG rrd files as you said, it worked fine,
but as soon as cron runs cmd.php, the graph and the history gets ruind.
The in/out data jump to more than 1 GB where the old history is no more than 128kb or 64kb.
If I leave MRTG to do the polling and cacti do the graphing, it works just fine, but I would prefare to let cacti collect the data and update the imported rrd.
Do you have any idea why is this happining?
Thank You.
but as soon as cron runs cmd.php, the graph and the history gets ruind.
The in/out data jump to more than 1 GB where the old history is no more than 128kb or 64kb.
If I leave MRTG to do the polling and cacti do the graphing, it works just fine, but I would prefare to let cacti collect the data and update the imported rrd.
Do you have any idea why is this happining?
Thank You.
I have a feeling this is due to an SNMP counter overflow of some sort. It is probably happening because cacti does not know where to "pick up" after MRTG left off, and it ends up overflowing the counter the first time it tries.
I don't have a great solution to this except trying to do a dump on the .rrd and seeing what the defined maximums are.
If I think of a fix, I'll let you know.
-Ian
I don't have a great solution to this except trying to do a dump on the .rrd and seeing what the defined maximums are.
If I think of a fix, I'll let you know.
-Ian
mrtg log conversion...
I still having problem with migrating mrtg log to rddtool (cacti).
First, i used a script log2rdd to convert the logs to rrd, its works fine, i used with ds0 (in) and ds1 (out) in my cacti system and graph the history... i think that is works.. but when cacti start to collect the data the history was erased and the numbers grow up to G... =(
Second, i convert the log files using mrtg (in cfg file used logformat: rrdtool) and think its works becuase a rrd file was generated, i used in cacti this file with ds0 and ds1, the history works fine for both (in / out) but when cacti start to collect new data, only a ds0 is collected.. why?
any idea?
thanks,
First, i used a script log2rdd to convert the logs to rrd, its works fine, i used with ds0 (in) and ds1 (out) in my cacti system and graph the history... i think that is works.. but when cacti start to collect the data the history was erased and the numbers grow up to G... =(
Second, i convert the log files using mrtg (in cfg file used logformat: rrdtool) and think its works becuase a rrd file was generated, i used in cacti this file with ds0 and ds1, the history works fine for both (in / out) but when cacti start to collect new data, only a ds0 is collected.. why?
any idea?
thanks,
If you are getting values that keep incrimenting it is probably because you are using a GUAGE datasource type when you should be using a COUNTER.
About cacti only collecting data for 'ds0'... Make sure you create two data sources for each rrd file. One data source will specify 'ds0' and the other will specify 'ds1'. They will both share the same filename however.
-Ian
About cacti only collecting data for 'ds0'... Make sure you create two data sources for each rrd file. One data source will specify 'ds0' and the other will specify 'ds1'. They will both share the same filename however.
-Ian
I have two data source name that point to one file (xxx.rrd)
Look:
data source name: A is ds0
data source name: B is ds1
both have data source type : COUNTER and point the same file (xxx.rrd).
but only collect data from ds0....
I will do an experiment and i will tell you what happend... jejeje... i hope that works... if not... i kill my self. jejeje just I'm kidding... =)
thanks
Look:
data source name: A is ds0
data source name: B is ds1
both have data source type : COUNTER and point the same file (xxx.rrd).
but only collect data from ds0....
I will do an experiment and i will tell you what happend... jejeje... i hope that works... if not... i kill my self. jejeje just I'm kidding... =)
thanks
Im still alive...
Its works.. cacti collect new data, graph it and admin all my sources.
Situation: i have a lot of graphs with MRTG, and i installed cacti (rrdtool) to admin all. Important is join the history with the new data.
Solution is:
1. Convert with mrtg the log to rrd file. (xxx.rrd)
2. Copy two files from xxx.rrd to create xxx_in.rrd and xxx_out.rrd. (cp xxx.rrd xxx_in.rrd;cp xxx.rrd xxx_out.rrd)
3. In cacti create two data source name, ds0 to file xxx_in.rrd and ds1 to xxx_out.rrd.
4. Create a graph
5. Finally add the data source name created to the graph.
* both have data source type : COUNTER.
good look.
Its works.. cacti collect new data, graph it and admin all my sources.
Situation: i have a lot of graphs with MRTG, and i installed cacti (rrdtool) to admin all. Important is join the history with the new data.
Solution is:
1. Convert with mrtg the log to rrd file. (xxx.rrd)
2. Copy two files from xxx.rrd to create xxx_in.rrd and xxx_out.rrd. (cp xxx.rrd xxx_in.rrd;cp xxx.rrd xxx_out.rrd)
3. In cacti create two data source name, ds0 to file xxx_in.rrd and ds1 to xxx_out.rrd.
4. Create a graph
5. Finally add the data source name created to the graph.
* both have data source type : COUNTER.
good look.
Who is online
Users browsing this forum: No registered users and 0 guests