Change ISP link names in MRTG/Cacti
1. Cacti
Login to Cacti. And select Graphs under Management tab.
Now select graph which name you wants to update or change.
To update the title first need to unlock the graph, select Unlock Graph.
After Unlocking the graph you can edit the Title as mentioned below.
After necessary changes click on Save to update the graph name.
Again lock the graph for any accidentally updates in graph.
2. MRTG
To create configuration file check below mentioned command.
/usr/local/mrtg-2/bin/cfgmaker --global 'WorkDir: /var/www/mrtg' --global 'Options[_]: growright,bits' --output /etc/mrtg/mrtg.cfg public@10.200.208.71 public@10.200.208.72
Login to MRTG server SSH console to make changes in Link names.
Edit the mrtg configuration file ( /etc/mrtg/mrtg.cfg)
Navigate to the title of your link to be modified.
Save the file after making necessary changes.
Now do the re-indexing of MRTG to update the link names by below mentioned command.
/usr/local/mrtg-2/bin/indexmaker –output=/var/www/mrtg/index.html /etc/mrtg/mrtg.cfg
Now after updating the configuration file, need to arrange the index.html file as per the requirements to see the output in proper and desired format, as i have mentioned below in my scenario.
/var/www/mrtg/index.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<TITLE>MRTG</TITLE>
<!-- Command line is easier to read using "View Page Properties" of your browser -->
<!-- But not all browsers show that information. :-( -->
<meta http-equiv="content-type" content="text/html; charset=iso-8859-15" >
<META NAME="Command-Line" CONTENT="/usr/local/mrtg-2/bin/indexmaker -output=/var/www/mrtg/index.html /etc/mrtg/mrtg.cfg" >
<META HTTP-EQUIV="Refresh" CONTENT="300" >
<META HTTP-EQUIV="Cache-Control" content="no-cache" >
<META HTTP-EQUIV="Pragma" CONTENT="no-cache" >
<META HTTP-EQUIV="Expires" CONTENT="Thu, 11 Jan 2018 14:30:13 GMT" >
<LINK HREF="favicon.ico" rel="shortcut icon" >
<style type="text/css">
/* commandline was: /usr/local/mrtg-2/bin/indexmaker -output=/var/www/mrtg/index.html /etc/mrtg/mrtg.cfg */
/* sorry, no style, just abusing this to place the commandline and pass validation */
</style>
</HEAD>
<BODY bgcolor="#ffffff" text="#000000" link="#000000" vlink="#000000" alink="#000000">
<H1>MRTG GIFT NSE IFSC LINKS</H1>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=10>
<tr>
<td><DIV><B>GIFT_CITY-To-BKC_TCL_100M_P2P</B></DIV>
<DIV><A HREF="10.200.208.71_4.html"><IMG BORDER=1 ALT="10.200.208.71_4 Traffic Graph" SRC="10.200.208.71_4-day.gif"></A><BR>
<SMALL><!--#flastmod file="10.200.208.71_4.html" --></SMALL></DIV>
</td>
<td><DIV><B>GIFT_CITY-To-BKC_AirTel_100M_P2P</B></DIV>
<DIV><A HREF="10.200.208.72_4.html"><IMG BORDER=1 ALT="10.200.208.72_4 Traffic Graph" SRC="10.200.208.72_4-day.gif"></A><BR>
<SMALL><!--#flastmod file="10.200.208.72_4.html" --></SMALL></DIV>
</td></tr>
<tr>
<td><DIV><B>GIFT_CITY-WAN-ILL-TCL_50M_VPN LINK</B></DIV>
<DIV><A HREF="10.200.208.71_3.html"><IMG BORDER=1 ALT="10.200.208.71_3 Traffic Graph" SRC="10.200.208.71_3-day.gif"></A><BR>
<SMALL><!--#flastmod file="10.200.208.71_3.html" --></SMALL></DIV>
</td></tr>
<tr>
<td><DIV><B>GIFT_CITY-To-AHM_TCL_10M_P2P</B></DIV>
<DIV><A HREF="10.200.208.71_6.html"><IMG BORDER=1 ALT="10.200.208.71_6 Traffic Graph" SRC="10.200.208.71_6-day.gif"></A><BR>
<SMALL><!--#flastmod file="10.200.208.71_6.html" --></SMALL></DIV>
</td>
<td><DIV><B>GIFT_CITY-To-AHM_AirTel_10M_P2P</B></DIV>
<DIV><A HREF="10.200.208.72_6.html"><IMG BORDER=1 ALT="10.200.208.72_6 Traffic Graph" SRC="10.200.208.72_6-day.gif"></A><BR>
<SMALL><!--#flastmod file="10.200.208.72_6.html" --></SMALL></DIV>
</td>
<tr>
<td><DIV><B>GIFY_CITY-To-CHN_TCL_250M_P2P</B></DIV>
<DIV><A HREF="10.200.208.71_5.html"><IMG BORDER=1 ALT="10.200.208.71_5 Traffic Graph" SRC="10.200.208.71_5-day.gif"></A><BR>
<SMALL><!--#flastmod file="10.200.208.71_5.html" --></SMALL></DIV>
<td><DIV><B>GIFT_CITY-To-CHN_AirTel_20M_P2P</B></DIV>
<DIV><A HREF="10.200.208.72_5.html"><IMG BORDER=1 ALT="10.200.208.72_5 Traffic Graph" SRC="10.200.208.72_5-day.gif"></A><BR>
<SMALL><!--#flastmod file="10.200.208.72_5.html" --></SMALL></DIV>
</td>
<td>
</td></tr>
</TABLE>
</BODY>
</HTML>
For 64Bit counter support try below syntax.
/usr/local/mrtg-2/bin/cfgmaker --global 'WorkDir: /var/www/mrtg' --global 'Options[_]: growright,bits' --output /etc/mrtg/mrtg1.cfg Chznd^zgup7@10.200.208.71:::::2 Chznd^zgup7@10.200.208.72:::::2
/usr/local/mrtg-2/bin/indexmaker -output=/var/www/mrtg/index.html /etc/mrtg/mrtg1.cfg
/usr/local/mrtg-2/bin/mrtg /etc/mrtg/mrtg1.cfg
No comments:
Post a Comment