Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SNMP & MRTG made in easy
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
lskbr
n00b
n00b


Joined: 22 Jan 2005
Posts: 1
Location: Manaus - AM - Brazil

PostPosted: Mon Aug 15, 2005 11:03 pm    Post subject: Tip about cat -s and cut and paste Reply with quote

Great howto!

Just a small tip for cat and cut & paste...

Replace all cat -s with cat -s <<EOF and write EOF at the end. Yes EOF.

Example:

Where you read:
Code:
/bin/cat -s  > /etc/cron.mrtg/swap.sh
#!/bin/sh
/usr/bin/mrtg /etc/mrtg/swap.cfg


Write:

Code:
/bin/cat -s <<EOF > /etc/cron.mrtg/swap.sh
#!/bin/sh
/usr/bin/mrtg /etc/mrtg/swap.cfg
EOF


The <<EOF version is ok to cut & paste.

I hope it helps copy & pasters :-)

LSK
Back to top
View user's profile Send private message
sskimb
n00b
n00b


Joined: 27 Aug 2005
Posts: 1

PostPosted: Sat Aug 27, 2005 12:05 pm    Post subject: Config error - TITLE[-] not specified Reply with quote

When I tried as recommended, I got the error as follows:

WARNING: "Title[-]" not specified
WARNING: "MaxBytes[-]" not specified
WARNING: I can't find a "target[-]" definition
ERROR: Please fix the error(s) in your config file

To avoid this problem, I used the following command:

cfgmaker --global 'WorkDir: /var/www/localhost/htdocs/mrtg' \
--global 'Options[_]: bits,growright' \
--output /etc/mrtg/traffic.cfg \
localhost
Back to top
View user's profile Send private message
WhoopeeCushion
n00b
n00b


Joined: 23 Aug 2005
Posts: 8

PostPosted: Sun Aug 28, 2005 11:18 am    Post subject: Reply with quote

After looking into how memory is managed by Linux I concluded that what I originaly typed in this post is kinda bullshit. I do however want to say that the OID used in the starting post gives limited information about memory usage. (Depends ofcourse what you want to see and personally I want to see everything).

in short... ignore this post from this point on or use it as an example on how it should not be... ;-)

###########################################################

Hi all,

I believe there is an error in the following part.

Code:
/bin/cat -s > /etc/mrtg/mem.cfg
LoadMIBs: /usr/share/snmp/mibs/HOST-RESOURCES-MIB.txt
[b]Target[localhost.mem]: .1.3.6.1.4.1.2021.4.11.0&.1.3.6.1.4.1.2021.4.11.0:public@localhost[/b]
.
.
.
Legend1[localhost.mem]: Free memory, not including swap, in bytes



The graph and the above code states : Free memory, not including swap, in bytes

but the OID used:

UCD-SNMP-MIB::memTotalFree.0 = INTEGER: 574992

Means all the mem including the swap.

I believe it is meant to be the

Code:

tux mrtg # snmpwalk -v 1 -c public 192.168.1.11  .1.3.6.1.4.1.2021.4
.
.
UCD-SNMP-MIB::memAvailReal.0 = INTEGER: 73528
.
.


which is OID: .1.3.6.1.4.1.2021.4.6.0

(Edited the post because of an error I made)
_________________
And this too shall pass........
Back to top
View user's profile Send private message
xaez
n00b
n00b


Joined: 04 Sep 2005
Posts: 13

PostPosted: Wed Sep 07, 2005 2:37 am    Post subject: mrtg doing silly things? Reply with quote

Great tutorial, it helped me a lot! Everything worked perfectly.. But now im trying to monitor cpu and fan temp. I have the OID's for my sensors, but when i get mrtg to log and graph it, it seems to keep overwriting the log file. It doesnt throw any error, it just seems to not store anything more than the latest value in the log file!

This is my fanspeed config file:
Code:
LoadMIBs: /usr/share/snmp/mibs/HOST-RESOURCES-MIB.txt
Target[localhost.fan]: .1.3.6.1.4.1.2021.13.16.3.1.3.1&.1.3.6.1.4.1.2021.13.16.3.1.3.1:public@localhost
PageTop[localhost.fan]: <H1>CPU Fan Speed</H1>
WorkDir: /var/www/localhost/htdocs/mrtg
Options[localhost.fan]:    gauge, absolute, nopercent, integer, noinfo, growright, pngdate
PNGTitle[localhost.fan]: CPU Fan Speed
Title[localhost.fan]: CPU Fan Speed
MaxBytes[localhost.fan]: 100
YLegend[localhost.fan]: rpm
ShortLegend[localhost.fan]: rpm
LegendI[localhost.fan]:  CPU Fan Speed:
LegendO[localhost.fan]:
Legend1[localhost.fan]: CPU Fan Speed



and when i do an snmpwalk on that OID, it returns:
Code:
snmpwalk -v 1 -c public 192.168.0.7  .1.3.6.1.4.1.2021.13.16.3.1.3.1
LM-SENSORS-MIB::lmFanSensorsValue.1 = Gauge32: 4326


After running the config for a few hours, this is all that is in the log file:
Code:
1126060501 4326 4326
1126060501 0 0 0 0
1126060202 0 0 0 0
1126060200 0 0 0 0
1126059900 0 0 0 0
1126059600 0 0 0 0
1126059300 0 0 0 0
...


The graphs are located here.
http://novak.no-ip.org/mrtg/localhost.fan.html

Any help would be greatly appreciated!
Back to top
View user's profile Send private message
ahorn
Guru
Guru


Joined: 01 Nov 2004
Posts: 366
Location: Ol' europe

PostPosted: Thu Sep 08, 2005 10:39 am    Post subject: Reply with quote

xaez: do you got it working? can you please add your temperature and fan configs/settings to this thread or to the wiki?

and why is there no ram/swap graph http://aquapeter.zapto.org/mrtg/
is it a bug that ping doesnt have a green stomache?
_________________
Too many connections. Please try again later.
Back to top
View user's profile Send private message
xaez
n00b
n00b


Joined: 04 Sep 2005
Posts: 13

PostPosted: Thu Sep 08, 2005 2:56 pm    Post subject: Reply with quote

Hi ahorn, i did infact get it working. Not sure what the problem was exactly, i just deleted my config and re-set it up. As for my fanspeed and cpu temp's; i had to sift through the snmpwalk output until i found something that resembled the OID which related to my fan and cpu. To monitor these sensors, you need lm_sensors installed (emerge -avt lm_sensors). Currently my OID for the fan controller is: .1.3.6.1.4.1.2021.13.16.3.1.3.1

Im sure yours will be different.

The same problem may be occuring for your ram and swap. Make sure that you have the correct OID. Try something like this is the command line:
Code:
snmpwalk -v 1 -c public localhost  .1.3.6.1.4.1.2021 | grep memAvailReal


if it returns something, you may have to sit there manually finding out the OID for that particcular variable.

The OID numbers are in a tree style format, whereby a number on the right is a child of the number on the left. So the more numbers you add, the more specific you get. Check the output from the command above and then try it without the grep:
Code:
snmpwalk -v 1 -c public localhost  .1.3.6.1.4.1.2021


The naviagate through the output until you can find the OID you require.. my memory one is currently:
Code:
.1.3.6.1.4.1.2021.4.6.0


As for your ping not having green, it simply means that the ping script is only returning 1 value when it gets called, not 2. mrtg reads 2 numbers, the one which graphs the blue line, and the other which graphs the green chunk. Each can correspond to a different variable, but when they are the same you can see that the blue line will folllow the top of the green chuck.

Hope this can be of some help for those trying to get this working.
Back to top
View user's profile Send private message
ahorn
Guru
Guru


Joined: 01 Nov 2004
Posts: 366
Location: Ol' europe

PostPosted: Sat Sep 10, 2005 7:01 am    Post subject: Reply with quote

i used the mem.cfg and swap.cfg as described in the wiki. i think it's right for my system, look at following output:
Code:

aquapeter ~ # snmpwalk -v 1 -c public localhost  memAvailSwap.0
UCD-SNMP-MIB::memAvailSwap.0 = INTEGER: 2031944
aquapeter ~ # snmpwalk -v 1 -c public localhost  .1.3.6.1.4.1.2021.4.11.0
UCD-SNMP-MIB::memTotalFree.0 = INTEGER: 2040924

_________________
Too many connections. Please try again later.


Last edited by ahorn on Sat Sep 10, 2005 7:19 am; edited 2 times in total
Back to top
View user's profile Send private message
xaez
n00b
n00b


Joined: 04 Sep 2005
Posts: 13

PostPosted: Sat Sep 10, 2005 7:15 am    Post subject: Reply with quote

Hmm, your memory seems to be working now. Not sure why the swap isnt working. Strange. Is the swap shell script executable? try running it manually via:
Code:
/etc/mrtg/swap.sh


if its not executable just type:
Code:
chmod +x /etc/mrtg/swap.sh



Short of remaking the config script im not sure what else could be wrong.
Back to top
View user's profile Send private message
ahorn
Guru
Guru


Joined: 01 Nov 2004
Posts: 366
Location: Ol' europe

PostPosted: Sat Sep 10, 2005 7:22 am    Post subject: Reply with quote

ok, i got the mem with .1.3.6.1.4.1.2021.4.6.0.
swap is executable. no errors at runing the script.
another question is, how you did a right temperature graph? is there some other formating needed?

edit: i tried it the swap with .1.3.6.1.4.1.2021.4.4.0 but still no graph.
_________________
Too many connections. Please try again later.
Back to top
View user's profile Send private message
xaez
n00b
n00b


Joined: 04 Sep 2005
Posts: 13

PostPosted: Sat Sep 10, 2005 9:08 am    Post subject: Reply with quote

Well, using lm_sensors i get this:
Code:
sensors

Code:
CPU Temp:    +49 C  (low  =   +15 C, high =   +40 C)   sensor = diode


and when i do an snmpwalk on the correct OID it returns a much larger value:

Code:
snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.13.16.2.1.3.1


Code:
LM-SENSORS-MIB::lmTempSensorsValue.1 = Gauge32: 49000


since its exactly 1000 times larger than the actual value, i just set the factor option in my config:

Code:
Factor[localhost.temp]: 0.001


which converts it to something more like the temperature, not some stupid value.

--- As for your swap config, make sure you have MaxBytes set fairly large.

Code:
MaxBytes[localhost.swap]: 1000000


If it isnt, sometimes it wont record the values.
Back to top
View user's profile Send private message
ahorn
Guru
Guru


Joined: 01 Nov 2004
Posts: 366
Location: Ol' europe

PostPosted: Sat Sep 10, 2005 9:37 am    Post subject: Reply with quote

I got the temp, now only the swap is left.
All seems clear ..
Code:

LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt
Target[localhost.swap]: .1.3.6.1.4.1.2021.4.4.0&.1.3.6.1.4.1.2021.4.4.0:public@localhost
PageTop[localhost.swap]: <H1>Swap Memory</H1>
WorkDir: /var/www/localhost/htdocs/mrtg
Options[localhost.swap]: nopercent,growright,gauge,noinfo
Title[localhost.swap]: Free Memory
MaxBytes[localhost.swap]: 1000000
kMG[localhost.swap]: k,M,G,T,P,X
YLegend[localhost.swap]: bytes
ShortLegend[localhost.swap]: bytes
LegendI[localhost.swap]:  Free Memory:
LegendO[localhost.swap]:
Legend1[localhost.swap]: Swap memory avail, in bytes
Code:

aquapeter ~ # snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.4.4.0
UCD-SNMP-MIB::memAvailSwap.0 = INTEGER: 2032180

_________________
Too many connections. Please try again later.
Back to top
View user's profile Send private message
xaez
n00b
n00b


Joined: 04 Sep 2005
Posts: 13

PostPosted: Sat Sep 10, 2005 9:48 am    Post subject: Reply with quote

Strange... Ill post my swap config file.

Code:

WorkDir: /var/www/localhost/htdocs/mrtg
LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt
Target[localhost.swap]: memAvailSwap.0&memAvailSwap.0:public@localhost
PageTop[localhost.swap]: <H1>Swap Memory</H1>
Options[localhost.swap]: nopercent,growright,gauge,noinfo,pngdate
PNGTitle[localhost.swap]: Free Swap Memory
Title[localhost.swap]: Free Memory
MaxBytes[localhost.swap]: 1000000
kMG[localhost.swap]: k,M,G,T,P,X
YLegend[localhost.swap]: bytes
ShortLegend[localhost.swap]: bytes
LegendI[localhost.swap]:  Free Memory:
LegendO[localhost.swap]:
Legend1[localhost.swap]: Swap memory avail, in bytes


Code:

crete ~ # snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.4.4.0
UCD-SNMP-MIB::memAvailSwap.0 = INTEGER: 1000336

or
Code:

crete ~ # snmpwalk -v 1 -c public localhost memAvailSwap.0
UCD-SNMP-MIB::memAvailSwap.0 = INTEGER: 1000336
Back to top
View user's profile Send private message
xaez
n00b
n00b


Joined: 04 Sep 2005
Posts: 13

PostPosted: Sat Sep 10, 2005 11:40 am    Post subject: Reply with quote

Also, how did you get it to display °C ? Mine comes up on the temperature graph as strange ascii characters. This is what my config has in it:

Code:
kMG[localhost.temp]: °C
Back to top
View user's profile Send private message
ahorn
Guru
Guru


Joined: 01 Nov 2004
Posts: 366
Location: Ol' europe

PostPosted: Sat Sep 10, 2005 1:32 pm    Post subject: Reply with quote

xaez wrote:
Also, how did you get it to display °C ? Mine comes up on the temperature graph as strange ascii characters. This is what my config has in it:

Code:
kMG[localhost.temp]: °C

this is my config, i guess it's similar to yours
Code:
LoadMIBs: /usr/share/snmp/mibs/LM-SENSORS-MIB.txt
Target[localhost.cpu-temp]: .1.3.6.1.4.1.2021.13.16.5.1.3.2&.1.3.6.1.4.1.2021.13.16.5.1.3.2:public@localhost
PageTop[localhost.cpu-temp]: <H1>CPU Temperature</H1>
WorkDir: /var/www/localhost/htdocs/mrtg
Options[localhost.cpu-temp]: nopercent,growright,gauge,noinfo,pngdate
Factor[localhost.cpu-temp]: 0.001
PNGTitle[localhost.cpu-temp]: CPU Temperature
Title[localhost.cpu-temp]: CPU Temperature
kMG[localhost.cpu-temp]: °C
MaxBytes[localhost.cpu-temp]: 100000
YLegend[localhost.cpu-temp]: Temperature
ShortLegend[localhost.cpu-temp]:
LegendI[localhost.cpu-temp]:  CPU Temperature:
LegendO[localhost.cpu-temp]:
Legend1[localhost.cpu-temp]: CPU Temperature

_________________
Too many connections. Please try again later.
Back to top
View user's profile Send private message
ahorn
Guru
Guru


Joined: 01 Nov 2004
Posts: 366
Location: Ol' europe

PostPosted: Mon Sep 12, 2005 6:33 am    Post subject: Reply with quote

i did also for hdd-temps. you need the tool 'hddtemp':
Code:
nano /etc/mrtg/hda-temp.sh

#!/bin/bash
/usr/sbin/hddtemp -q -n /dev/hda
/usr/sbin/hddtemp -q -n /dev/hda

---
nano /etc/mrtg/hda-temp.cfg

WorkDir: /var/www/localhost/htdocs/mrtg
Title[localhost.hda-temp]: /dev/hda Temperature
PageTop[localhost.hda-temp]: <H1>/dev/hda Temperature</H1>
Target[localhost.hda-temp]: `/etc/mrtg/hda-temp.sh`
MaxBytes[localhost.hda-temp]: 200000
Options[localhost.hda-temp]: growright,nopercent,gauge,pngdate
PNGTitle[localhost.hda-temp]: /dev/hda Temperature
kMG[localhost.hda-temp]: °C
YLegend[localhost.hda-temp]: Temperature
ShortLegend[localhost.hda-temp]:
LegendI[localhost.hda-temp]:  /dev/hda Temperatur:
LegendO[localhost.hda-temp]:
Legend1[localhost.hda-temp]: /dev/hda Temperature

my hdc is not official supporrted by hddtemp but it works:
Code:
nano /etc/mrtg/hdc-temp.cfg

#!/bin/bash
/usr/sbin/hddtemp -n -q /dev/hdc | cut -c 28-29
/usr/sbin/hddtemp -n -q /dev/hdc | cut -c 28-29

The is a way with smartctl, too, but i prefer hddtemp.

don't forget to chmod+x the *.sh files. the files for cronjob should be similar and easy.
it would be good if someone add our temperature-stuff to the wiki.
_________________
Too many connections. Please try again later.
Back to top
View user's profile Send private message
ahorn
Guru
Guru


Joined: 01 Nov 2004
Posts: 366
Location: Ol' europe

PostPosted: Mon Sep 12, 2005 6:49 am    Post subject: Reply with quote

xaez: i see, you got uptime and user count graphs, that's nice, how can i do that?
_________________
Too many connections. Please try again later.
Back to top
View user's profile Send private message
xaez
n00b
n00b


Joined: 04 Sep 2005
Posts: 13

PostPosted: Sun Sep 25, 2005 3:15 am    Post subject: Reply with quote

Hey ahorn, sorry i havent checked this thread in a while.

The uptime graphs are generated with php (not the most effecient way, but it works).

my mrtg config looks like this:
Code:
Target[nubia_uptime]:    `php /srv/www/phpscripts/up.php`
YTicsFactor[nubia_uptime]: 0.00069444444444444055555555555556
Factor[nubia_uptime]: 0.00069444444444444055555555555556
MaxBytes[nubia_uptime]:    100000
Title[nubia_uptime]: Up/Idle time for crete
PNGTitle[nubia_uptime]: Up/Idle time for crete
Options[nubia_uptime]:    gauge, absolute, noinfo, growright, pngdate, nopercent
YLegend[nubia_uptime]: Up-Idle time(days)
ShortLegend[nubia_uptime]:   Days
LegendI[nubia_uptime]:    Uptime:
LegendO[nubia_uptime]:    Idle time:
PageTop[nubia_uptime]: <H1>Up/Idle time for crete</H1>


This config then executes the php binary on my php script called up.php.

up.php contains:

Code:

<?php
$value = "0\n0";
$uptime = exec("cat /proc/uptime");
$v = explode(" ",$uptime);
$up = explode(".",$v[0]);
$up2 = explode(".",$v[1]);
$uppy = round($up[0] / 60);
$uppy2 = round($up2[0] / 60);
echo $uppy . "\n" . $uppy2;
?>


it graphs the uptime, and the amount of time the machine is idle.


My usercount script is pretty much the same. I used php to do this one too.
my mrtg user count config file:
Code:

Target[users]:   `php /srv/www/phpscripts/users.php `
AbsMax[users]: 15
MaxBytes[users]:   10
PNGTitle[users]: Users for crete
Title[users]: users on crete
Options[users]:    gauge, absolute, integer, noinfo, growright, pngdate, noperce
nt
ShortLegend[users]:     users
YLegend[users]: users
LegendI[users]:    users:
LegendO[users]:
PageTop[users]: <H1>User count on crete</H1>


And the user count php script:
Code:

<?php
$var = shell_exec("uptime");
$v = explode(" user",$var);
$res = explode(", ",$v[0]);
$var2 = $res[count($res)-1];
echo trim($var2) . "\n" . trim($var2);
?>



You can achieve the same result in C, but i don't know C - so i used php
Back to top
View user's profile Send private message
xaez
n00b
n00b


Joined: 04 Sep 2005
Posts: 13

PostPosted: Sun Sep 25, 2005 4:01 am    Post subject: Reply with quote

I have also found the snmp variable for user count. Provided you have the correct sensors on and such..

Give it a try:

Code:
xaez@latvia ~ $ snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.11.9
 UCD-SNMP-MIB::ssCpuUser.0 = INTEGER: 4
Back to top
View user's profile Send private message
mephist0
Tux's lil' helper
Tux's lil' helper


Joined: 19 Sep 2005
Posts: 94
Location: Germany, near Frankfurt/Main

PostPosted: Sun Oct 09, 2005 1:11 pm    Post subject: Reply with quote

hi,

I installed it and it works, great how-to !


but, on my desktop pc snmpd needs 13-15% cpu under X ???

If I shut down X snmpd needs only 0.1 - 1.0% cpu under console

but on my server I installed it too, and snmpd need max 1% cpu all time, even when X is loaded ????

my desktop is Pentium IV 3.00GHZ and my server is Pentium IV 1,7GHZ

any advice ?

EDIT : Solved ! The log file was 200KByte, I moved it to .log.old and now works fine with 0 - 1% cpu :)

EDIT #2 : hmmm, didnt work well just deleting the .log, now since 2 days snmpd got 15% cpu usage, and my net-snmp.log is about 75MB !!

the only thing it writes to the log is :

Connection from UDP: [127.0.0.1]:32785

but that thousands of times

but when I close X server, snmpd got 0% cpu usage ?!?!

kinda strange

any ideas ?

thx in advance
_________________
There is only one God, and his name is Death. And there is only one thing we say to Death: 'Not today!'

Fotoblog
Back to top
View user's profile Send private message
Dreadfull
Tux's lil' helper
Tux's lil' helper


Joined: 15 Apr 2005
Posts: 139

PostPosted: Sat Nov 12, 2005 11:00 am    Post subject: Reply with quote

anyone knows why would i get this?

Code:

WARNING: Could not match host:'1:public@localhost:' ref:'Descr' key:'eth0'
WARNING: Could not match host:'2:public@localhost:' ref:'Descr' key:'eth0'


Code:

### Interface 1 >> Descr: 'eth0' | Name: 'uplink' | Ip: '86.55.7.210' | Eth: '00-50-bf-b3-89-12' ###

Target[localhost_eth0]: \eth0:public@localhost:
SetEnv[localhost_eth0]: MRTG_INT_IP="86.55.7.210" MRTG_INT_DESCR="eth0"
MaxBytes[localhost_eth0]: 12500000
Title[localhost_eth0]: 86.55.55.210 -- phantom.sunshells.ro
PageTop[localhost_eth0]: <H1>86.55.55.210 -- phantom.sunshells.ro</H1>
 <TABLE>
   <TR><TD>System:</TD>     <TD>phantom.sunshells.ro in Bucharest</TD></TR>
   <TR><TD>Maintainer:</TD> <TD>Dreadfull &lt;dreadfull@sunshells.ro&gt;</TD></TR>
   <TR><TD>Description:</TD><TD>eth0  </TD></TR>
   <TR><TD>ifType:</TD>     <TD>ethernetCsmacd (6)</TD></TR>
   <TR><TD>ifName:</TD>     <TD></TD></TR>
   <TR><TD>Max Speed:</TD>  <TD>100.0 Mbits/s</TD></TR>
   <TR><TD>Ip:</TD>         <TD>86.55.7.210 (uplink.sunshells.ro)</TD></TR>
 </TABLE>


### Interface 2 >> Descr: 'eth1' | Name: '' | Ip: '192.168.65.254' | Eth: '00-50-bf-b3-89-0d' ###

Target[localhost_eth1]: \eth1:public@localhost:
SetEnv[localhost_eth1]: MRTG_INT_IP="192.168.65.254" MRTG_INT_DESCR="eth1"
MaxBytes[localhost_eth1]: 12500000
Title[localhost_eth1]: 192.168.65.254 -- phantom.sunshells.ro
PageTop[localhost_eth1]: <H1>192.168.65.254 -- phantom.sunshells.ro</H1>
 <TABLE>
   <TR><TD>System:</TD>     <TD>phantom.sunshells.ro in Bucharest</TD></TR>
   <TR><TD>Maintainer:</TD> <TD>Dreadfull &lt;dreadfull@sunshells.ro&gt;</TD></TR>
   <TR><TD>Description:</TD><TD>eth1  </TD></TR>
   <TR><TD>ifType:</TD>     <TD>ethernetCsmacd (6)</TD></TR>
   <TR><TD>ifName:</TD>     <TD></TD></TR>
   <TR><TD>Max Speed:</TD>  <TD>100.0 Mbits/s</TD></TR>
   <TR><TD>Ip:</TD>         <TD>192.168.65.254 (phantom.sunshells.ro)</TD></TR>
 </TABLE>

### Interface 3 >> Descr: 'eth0:1' | Name: 'sunshells.ro' | Ip: '86.55.25.128' | Eth: '00-50-bf-b3-89-12' ###

Target[localhost_eth0:1]: \eth0:1:public@localhost:
SetEnv[localhost_eth0:1]: MRTG_INT_IP="86.55.25.128" MRTG_INT_DESCR="eth0:1"
MaxBytes[localhost_eth0:1]: 12500000
Title[localhost_eth0:1]: 86.55.25.128 -- sunshells.ro
PageTop[localhost_eth0:1]: <H1>86.55.25.128 -- sunshells.ro</H1>
 <TABLE>
   <TR><TD>System:</TD>     <TD>sunshells.ro in Bucharest</TD></TR>
   <TR><TD>Maintainer:</TD> <TD>Dreadfull &lt;dreadfull@sunshells.ro&gt;</TD></TR>
   <TR><TD>Description:</TD><TD>eth0:1  </TD></TR>
   <TR><TD>ifType:</TD>     <TD>ethernetCsmacd (6)</TD></TR>
   <TR><TD>ifName:</TD>     <TD></TD></TR>
   <TR><TD>Max Speed:</TD>  <TD>100.0 Mbits/s</TD></TR>
   <TR><TD>Ip:</TD>         <TD>86.55.25.128 (sunshells.ro)</TD></TR>
 </TABLE>

### Interface 4 >> Descr: 'eth0:2' | Name: 'dreadfull.b.evolvatelecom.net' | Ip: '86.55.25.129' | Eth: '00-50-bf-b3-89-12' ###

Target[localhost_eth0:2]: \eth0:2:public@localhost:
SetEnv[localhost_eth0:2]: MRTG_INT_IP="86.55.25.129" MRTG_INT_DESCR="eth0:2"
MaxBytes[localhost_eth0:2]: 12500000
Title[localhost_eth0:2]: 86.55.25.129 -- dreadfull.b.evolvatelecom.net
PageTop[localhost_eth0:2]: <H1>86.55.25.129 -- dreadfull.b.evolvatelecom.net</H1>
 <TABLE>
   <TR><TD>System:</TD>     <TD>sunshells.ro in Bucharest</TD></TR>
   <TR><TD>Maintainer:</TD> <TD>Dreadfull &lt;dreadfull@sunshells.ro&gt;</TD></TR>
   <TR><TD>Description:</TD><TD>eth0:2  </TD></TR>
   <TR><TD>ifType:</TD>     <TD>ethernetCsmacd (6)</TD></TR>
   <TR><TD>ifName:</TD>     <TD></TD></TR>
   <TR><TD>Max Speed:</TD>  <TD>100.0 Mbits/s</TD></TR>
   <TR><TD>Ip:</TD>         <TD>86.55.25.129 (dreadfull.b.evolvatelecom.net)</TD></TR>
 </TABLE>

### Interface 5 >> Descr: 'eth0:3' | Name: 'dreadfull.evolva.ro' | Ip: '86.55.25.130' | Eth: '00-50-bf-b3-89-12' ###

Target[localhost_eth0:3]: \eth0:3:public@localhost:
SetEnv[localhost_eth0:3]: MRTG_INT_IP="86.55.25.130" MRTG_INT_DESCR="eth0:3"
MaxBytes[localhost_eth0:3]: 12500000
Title[localhost_eth0:3]: 86.55.25.130 -- dreadfull.evolva.ro
PageTop[localhost_eth0:3]: <H1>86.55.25.130 -- dreadfull.evolva.ro</H1>
 <TABLE>
   <TR><TD>System:</TD>     <TD>sunshells.ro in Bucharest</TD></TR>
   <TR><TD>Maintainer:</TD> <TD>Dreadfull &lt;dreadfull@sunshells.ro&gt;</TD></TR>
   <TR><TD>Description:</TD><TD>eth0:3  </TD></TR>
   <TR><TD>ifType:</TD>     <TD>ethernetCsmacd (6)</TD></TR>
   <TR><TD>ifName:</TD>     <TD></TD></TR>
   <TR><TD>Max Speed:</TD>  <TD>100.0 Mbits/s</TD></TR>
   <TR><TD>Ip:</TD>         <TD>86.55.25.130 (dreadfull.evolva.ro)</TD></TR>
 </TABLE>

and so on .. doesn't mrtg support this define type ? like eth0:3 ? or what ?
_________________
CPU: AMD Athlon 64 3200+
RAM: 2 GB DDR 400 Dual channel
HDD: 2x200 GB WDC SATA
OS: Gentoo 2005.1
Compiler: GCC 3.4.5
kernel: 2.6.14-hardened-r5
Back to top
View user's profile Send private message
kevinverma
n00b
n00b


Joined: 19 Nov 2005
Posts: 1

PostPosted: Sat Nov 19, 2005 12:16 pm    Post subject: How to monitor a ppp interface with mrtg Reply with quote

Hello,

I will be very much thankful if someone can please hint me special case of a non-static ppp interface, so that it can be monitored via mrtg. I suppose this is a non-snmp interface as well.

Many Thanks for reading,
Back to top
View user's profile Send private message
novazur
Guru
Guru


Joined: 19 Mar 2005
Posts: 461
Location: Martinique

PostPosted: Sat Feb 11, 2006 8:53 pm    Post subject: Reply with quote

Hi,

I can't understand why I can't have my fans speed with :

Code:
WorkDir: /var/log/www/mrtg
LoadMIBs: /usr/share/snmp/mibs/LM-SENSORS-MIB.txt
Target[localhost.cpu-fan]: lmFanSensorsValue.2&lmFanSensorsValue.1:public@localhost
Options[localhost.cpu-fan]:    nopercent,growright,gauge,noinfo
Title[localhost.cpu-fan]: CPU Fan Speed
PageTop[localhost.cpu-fan]: <H1>CPU Fan Speed</H1>
MaxBytes[localhost.cpu-fan]: 10000
YLegend[localhost.cpu-fan]: rpm
ShortLegend[localhost.cpu-fan]: rpm
LegendI[localhost.cpu-fan]:  CPU Fan Speed:
LegendO[localhost.cpu-fan]: Other Fan Speed
Legend1[localhost.cpu-fan]: CPU Fan Speed:
Legend2[localhost.cpu-fan]: Other Fan Speed
Language: french


Code:
# /usr/bin/mrtg /etc/mrtg/fan.cfg
Use of uninitialized value in concatenation (.) or string at /usr/bin/../lib/mrtg2/SNMP_util.pm line 1266, <MIB> line 31.
Use of uninitialized value in concatenation (.) or string at /usr/bin/../lib/mrtg2/SNMP_util.pm line 1266, <MIB> line 33.
Use of uninitialized value in concatenation (.) or string at /usr/bin/../lib/mrtg2/SNMP_util.pm line 1266, <MIB> line 262.
cannot encode Object ID .16.3.1.3.2: first subid too big in Object ID 16.3.1.3.2 at /usr/bin/mrtg line 1849
ERROR: Target[localhost.cpu-fan][_IN_] ' $target->[0]{$mode} ' did not eval into defined data
ERROR: Target[localhost.cpu-fan][_OUT_] ' $target->[0]{$mode} ' did not eval into defined data


Code:
# /usr/bin/snmpwalk -v 1 -c public localhost lmFanSensors
LM-SENSORS-MIB::lmFanSensorsIndex.1 = INTEGER: 0
LM-SENSORS-MIB::lmFanSensorsIndex.2 = INTEGER: 1
LM-SENSORS-MIB::lmFanSensorsIndex.3 = INTEGER: 2
LM-SENSORS-MIB::lmFanSensorsDevice.1 = STRING: fan1
LM-SENSORS-MIB::lmFanSensorsDevice.2 = STRING: CPU Fan
LM-SENSORS-MIB::lmFanSensorsDevice.3 = STRING: fan3
LM-SENSORS-MIB::lmFanSensorsValue.1 = Gauge32: 6026
LM-SENSORS-MIB::lmFanSensorsValue.2 = Gauge32: 3924
LM-SENSORS-MIB::lmFanSensorsValue.3 = Gauge32: 0


Help ?

<edit Solved>
I got it
</edit>
Back to top
View user's profile Send private message
ayem
n00b
n00b


Joined: 24 Mar 2004
Posts: 19
Location: Krakow PL

PostPosted: Fri Feb 17, 2006 11:51 am    Post subject: Reply with quote

strange thing for me - maybe its ok but...

My server is Dual Pentium3 450MHz machine on chipset n440bx by intel

SMP is correct - compilation is running on both processors.

now if i run one process mprime its running on one processor, and 'top' describes cpu load as 49.9%, but on myy mrtg i see 78%

is there any explanation of this fact? could and eventually how, can i make it work corectly?

MRTG

edit: is this because CPU shows system load insted of raw CPU %?
_________________
ayem
Back to top
View user's profile Send private message
anidabi
Tux's lil' helper
Tux's lil' helper


Joined: 05 Feb 2005
Posts: 102
Location: Finland

PostPosted: Mon Mar 20, 2006 4:07 pm    Post subject: Reply with quote

I have a little problem. Yesterday I decited to "tweak" my mrtg graphs a little bit, so I schanget colors and made some withpeak and some other minor adjustments. Anyway, the broplem is that, when I update the graphs by running the mrtg script, it shows the graphs right. But after cron has updated the graphs after that, the colors are all wrong and also the size of the graphs.

Anyone has any clue why it behaves like that?
_________________
How do you do the things you do...
Back to top
View user's profile Send private message
Woody2143
n00b
n00b


Joined: 26 Mar 2003
Posts: 19
Location: Atlanta, GA

PostPosted: Tue Mar 21, 2006 2:45 am    Post subject: Great Overview of the config syntax Reply with quote

Gentlemen,

I have been playing around with this for a short time now, though I've not followed the guide at the start of this thread. Maybe later I'll convert over to use rddtool.

Anyway, in my haxing about with the config files I found a pretty good overview of the config files and what settings mean what. Well worth reading through: http://www.linuxhomenetworking.com/linux-hn/mrtg-advanced.htm


Just thought I'd pass it along....
_________________
-- Woody2143
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3, 4  Next
Page 2 of 4

 
Jump to:  
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 vote in polls in this forum