Hi all,
Been looking in the forums for an answer to this but dont seem to having any luck.
What I have is just over 450 graph, the majority of them have been using the default "Interface - Traffic (bits/sec)" template. I created a new template as I didnt want to break what was already working
Now I have the new template as I want it, I want to now change the graphs to use this new template. Is there a way to change the graphs using "Interface - Traffic (bits/sec)" to my new template. Ive been doing it manually so far grrr.
I know it will be some SQL of sorts but as im new to cacti, I dont know what I need to do.
Any help will be much appreciated
Regards
Mark K
Changing templates on Multiple graphs?
Moderators: Developers, Moderators
Changing templates on Multiple graphs?
- Attachments
-
- graph_image.jpg (40.03 KiB) Viewed 1005 times
Sadly no, there is no easy way to change all your graph templates over to the new one. If you're familiar with MySQL, then you could possibly write a script to go in and change them. Otherwise, it's going to have to be by hand.
Would you mind posting that graph template in the script forum? It looks pretty cool
Would you mind posting that graph template in the script forum? It looks pretty cool
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
To create the graph as shown I basically used the same principle as in http://forums.cacti.net/about8520.html
I created cdef's for 10% -> 90% and -10% -> -90%
-10% : cdef=CURRENT_DATA_SOURCE,2,/,0.1,*,8,*,-1,*
-20% : cdef=CURRENT_DATA_SOURCE,2,/,0.2,*,8,*,-1,*
-30% : cdef=CURRENT_DATA_SOURCE,2,/,0.3,*,8,*,-1,*
-40% : cdef=CURRENT_DATA_SOURCE,2,/,0.4,*,8,*,-1,*
-50% : cdef=CURRENT_DATA_SOURCE,2,/,0.5,*,8,*,-1,*
-60% : cdef=CURRENT_DATA_SOURCE,2,/,0.6,*,8,*,-1,*
-70% : cdef=CURRENT_DATA_SOURCE,2,/,0.7,*,8,*,-1,*
-80% : cdef=CURRENT_DATA_SOURCE,2,/,0.8,*,8,*,-1,*
-90% : cdef=CURRENT_DATA_SOURCE,2,/,0.9,*,8,*,-1,*
10% : cdef=a,1.5,/,0.1,*,8,*
20% : cdef=a,1.5,/,0.2,*,8,*
30% : cdef=a,1.5,/,0.3,*,8,*
40% : cdef=a,1.5,/,0.4,*,8,*
50% : cdef=a,1.5,/,0.5,*,8,*
60% : cdef=a,1.5,/,0.6,*,8,*
70% : cdef=a,1.5,/,0.7,*,8,*
80% : cdef=a,1.5,/,0.8,*,8,*
90% : cdef=a,1.5,/,0.9,*,8,*
Note : these defs are just for cosmetic reasons
also using:
for +/-100%
cdef=CURRENT_DATA_SOURCE,8,*
(byte -> bits)
and
cdef=CURRENT_DATA_SOURCE,8,*,-1,*
(bytes -> bits, make neg)
I also imported the colours as per :
http://forums.cacti.net/about6308.html
The template is from new!!
Starting with either inbound / outbound (i did inbound)
Graph Template Items / add
1, data source: Template traffic in|out
2, Color: #FF0000
3, Graph Item Type: AREA
4, Consolidation Function: AVERAGE
5, CDEF Function: Byte -> bits
6, Text Format: Inbound
The above creates the 100% graph. I repeated 1 -> 6 but using the different cdef's, 90%, 80%....10% using the following colours
90:FF3333
80:FF5F00
70:FF8C1A
60:FFA54C
50:FFFF1A
40:FFFF80
30:FFFF99
20:FFFFCC
10:FFFFE6
For the outbound i used the same method only this time using -90%, -80%.....-10%
The -100% use the bytes -> bits make neg cdef
Colours :
-100:CCCCCC
-90:B2B2B2
-80:999999
-70:9999FF
-60:808080
-50:666666
-40:4C4C4C
-30:333333
-20:1A1A1A
-10:000000
Basically ending up with somthing like the image "colour.jpg"
Not the best are creating howtos but hope this helps.
I did try using stack but would not work and got fed up trying so ended up with this... I im rather pleased with the result being a bit of a newbie...
Oh and the black background.. see http://forums.cacti.net/about2930.htm
I created cdef's for 10% -> 90% and -10% -> -90%
-10% : cdef=CURRENT_DATA_SOURCE,2,/,0.1,*,8,*,-1,*
-20% : cdef=CURRENT_DATA_SOURCE,2,/,0.2,*,8,*,-1,*
-30% : cdef=CURRENT_DATA_SOURCE,2,/,0.3,*,8,*,-1,*
-40% : cdef=CURRENT_DATA_SOURCE,2,/,0.4,*,8,*,-1,*
-50% : cdef=CURRENT_DATA_SOURCE,2,/,0.5,*,8,*,-1,*
-60% : cdef=CURRENT_DATA_SOURCE,2,/,0.6,*,8,*,-1,*
-70% : cdef=CURRENT_DATA_SOURCE,2,/,0.7,*,8,*,-1,*
-80% : cdef=CURRENT_DATA_SOURCE,2,/,0.8,*,8,*,-1,*
-90% : cdef=CURRENT_DATA_SOURCE,2,/,0.9,*,8,*,-1,*
10% : cdef=a,1.5,/,0.1,*,8,*
20% : cdef=a,1.5,/,0.2,*,8,*
30% : cdef=a,1.5,/,0.3,*,8,*
40% : cdef=a,1.5,/,0.4,*,8,*
50% : cdef=a,1.5,/,0.5,*,8,*
60% : cdef=a,1.5,/,0.6,*,8,*
70% : cdef=a,1.5,/,0.7,*,8,*
80% : cdef=a,1.5,/,0.8,*,8,*
90% : cdef=a,1.5,/,0.9,*,8,*
Note : these defs are just for cosmetic reasons
also using:
for +/-100%
cdef=CURRENT_DATA_SOURCE,8,*
(byte -> bits)
and
cdef=CURRENT_DATA_SOURCE,8,*,-1,*
(bytes -> bits, make neg)
I also imported the colours as per :
http://forums.cacti.net/about6308.html
The template is from new!!
Starting with either inbound / outbound (i did inbound)
Graph Template Items / add
1, data source: Template traffic in|out
2, Color: #FF0000
3, Graph Item Type: AREA
4, Consolidation Function: AVERAGE
5, CDEF Function: Byte -> bits
6, Text Format: Inbound
The above creates the 100% graph. I repeated 1 -> 6 but using the different cdef's, 90%, 80%....10% using the following colours
90:FF3333
80:FF5F00
70:FF8C1A
60:FFA54C
50:FFFF1A
40:FFFF80
30:FFFF99
20:FFFFCC
10:FFFFE6
For the outbound i used the same method only this time using -90%, -80%.....-10%
The -100% use the bytes -> bits make neg cdef
Colours :
-100:CCCCCC
-90:B2B2B2
-80:999999
-70:9999FF
-60:808080
-50:666666
-40:4C4C4C
-30:333333
-20:1A1A1A
-10:000000
Basically ending up with somthing like the image "colour.jpg"
Not the best are creating howtos but hope this helps.
I did try using stack but would not work and got fed up trying so ended up with this... I im rather pleased with the result being a bit of a newbie...
Oh and the black background.. see http://forums.cacti.net/about2930.htm
- Attachments
-
- colour.jpg (116.36 KiB) Viewed 971 times
In cacti, go to Export Template -> Graph template. Much much easier than typing it all out
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Who is online
Users browsing this forum: No registered users and 0 guests