Cheshire Cat Computing

Software support and information
It is currently Sun May 19, 2013 7:05 pm

All times are UTC + 12 hours [ DST ]




Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Thu Jan 26, 2012 12:00 pm 
Offline
Silver User

Joined: Thu Jan 26, 2012 11:32 am
Posts: 10
Location: Linköping, Sweden
Thanks for a great template!

I made some modifications to the file:

1) My version of mrtg would bail out unless the PageTop lines had H1 html-tags.
2) I added the option growright to all graphs, this was to make it look good together with the script host_create_page.sh which I also include.
3) I added the option noo to some graphs to avoid dummy "out"-graphs.
4) I multiplied maxreal and maxswap with 1024 to get the right values.

With these modifications the template works fine for me, but I have only tested it on Linux.

I use the template with the script host_create_page.sh to create a directory for each host. Depending on your snmp configuration you might want to change the snmp community to something else than "public".

I also have a very simple script which is called by a cron job every 5 minutes, that script only uses a Makefile to update all the mrtg directories.

regards Henrik


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
PostPosted: Thu Jan 26, 2012 12:03 pm 
Offline
Silver User

Joined: Thu Jan 26, 2012 11:32 am
Posts: 10
Location: Linköping, Sweden
Henrik wrote:
I also have a very simple script which is called by a cron job every 5 minutes, that script only uses a Makefile to update all the mrtg directories.


For some reason I am not able to attach my Makefile, I will simply paste it directly into this message:

Code:
CFG_FILES = $(wildcard */mrtg.cfg)

HTML_FILES = $(CFG_FILES:%/mrtg.cfg=%/index.html)
MRTG_RUNS  = $(CFG_FILES:%/mrtg.cfg=%/mrtg.dummy)

all: $(MRTG_RUNS)

$(HTML_FILES): %/index.html: %/mrtg.cfg
        /usr/local/mrtg-2/bin/indexmaker --title=$(@D) $< > $@

$(MRTG_RUNS): %/mrtg.dummy: %/mrtg.cfg %/index.html
        /usr/local/mrtg-2/bin/mrtg $<


regards Henrik


Top
 Profile  
 
PostPosted: Thu Jan 26, 2012 12:08 pm 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 2921
Location: Auckland, New Zealand
Thanks for posting your changes! It looks like your *1024 fix to make the stored value in bytes rather than K is a particularly good one, not sure how I missed this the first time around. Also, the requirement for <h1> in the PageTop I'venot head of before -- which version of MRTG are you using with this check? Possibly it is an older one?

Steve

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile  
 
PostPosted: Fri Jan 27, 2012 10:50 am 
Offline
Silver User

Joined: Thu Jan 26, 2012 11:32 am
Posts: 10
Location: Linköping, Sweden
stevesh wrote:
Possibly it is an older one?


I think it is a rather new version installed only a few months ago. I will check the exact version number of MRTG tomorrow when I'm at work.

regards Henrik


Top
 Profile  
 
PostPosted: Sat Jan 28, 2012 9:17 am 
Offline
Silver User

Joined: Thu Jan 26, 2012 11:32 am
Posts: 10
Location: Linköping, Sweden
Henrik wrote:
1) My version of mrtg would bail out unless the PageTop lines had H1 html-tags.


I'm using version 2.17.3 of MRTG. I don't remember for sure if it was mrtg or indexmaker which bailed out if the H1 tags was missing.

regards Henrik


Top
 Profile  
 
PostPosted: Wed Mar 14, 2012 8:33 am 
Offline
Silver User

Joined: Thu Jan 26, 2012 11:32 am
Posts: 10
Location: Linköping, Sweden
Henrik wrote:
I use the template with the script host_create_page.sh to create a directory for each host.

Today I found the hard way that using the default snmp v1 in mrtg might cause overflow with 1 Gb/s or 10 Gb/s NICs.

I slightly modified my script to use snmp v2 instead.

I also use a modified directory listing php script to create a web page with all my mrtg directories, my modified script is included as index.sh but should be renamed to index.php. I was not able to post the script to this forum without renaming it. To use it the original package from http://www.evoluted.net/thinktank/web-d ... ing-script is needed.

I tried to post a comment at the above page where I asked about the license of the directory listing script.Unfortunately it seems as my post was rejected, but as a reply to another comment the author of the script wrote:

Quote:
Just to confirm you are free to use the script as you see fit.

Even though that comment was not written to me I assume my modification is also OK.

regards Henrik


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
PostPosted: Wed Jul 11, 2012 8:12 pm 
Offline
User

Joined: Wed Jul 11, 2012 8:15 am
Posts: 1
I just tried this template on a linux server, couple of comments.

Firstly I ran into the H1 issue that henrik did, using his version of the script fixed that.
Secondly "free" memory on a linux box isn't actually a very useful figure since linux will use as much as it can for disk cache. So generally free+cached is more interesting than free.


Top
 Profile  
 
PostPosted: Fri Mar 15, 2013 5:24 pm 
Offline
User

Joined: Fri Mar 15, 2013 5:18 pm
Posts: 1
The issue with indexmaker and configs generated has to do with the PageTop entry not being encapsulated in heading tags in the generated config file.

For example:

PageTop[my-server-cpu]: my-server CPU usage

needs to be:

PageTop[my-server-cpu]: <H1>my-server CPU usage</H1>


I manually went through the generated config file and added the H1 tags to everywhere PageTop was. After that I was able to run indexmaker on the file with no errors.

Great template otherwise!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2

All times are UTC + 12 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group