emerge -av net-analyzer/net-snmp media-libs/gd net-analyzer/mrtg app-admin/hddtemp
Run thee commands to create the directories that MRTG will use
/usr/bin/mkdir -p /var/www/localhost/htdocs/mrtg
Next edit /etc/snmp/snmpd.conf it should look like so. Of Course change ME to your name and include the correct email address as well.
com2sec local 10.10.10.0/24 public
group MyROGroup v1 local
group MyROGroup v2c local
group MyROGroup usm local
view all included .1 80
access MyROGroup “” any noauth exact all none none
Edit /etc/conf.d/snmpd and add “-c /etc/snmp/snmpd.conf” into the SNMPD_FLAGS section.
Now you want to start the SNMPD service. and add it to system startup.
/sbin/rc-update add snmpd default
Now for the MRTG goodness. You need to run the config maker with this command. Take note that it is all 1 line.
Once you have done that Download this tar and untar it into your /etc/. If done correctly you should have a folder named /mrtg located in your /etc directory. You might want to look over the files to make sure they are to your likings.
Next you want to download this file and untar them into /etc/cron.mrtg/.
You want to make sure that the files have all the right permissions so use these commands
/bin/chmod +x /etc/mrtg/*.sh
Now start HDDTemp, I always use the restart command when starting a service. And also add it to the system startup.
rc-update add hddtemp default
Now you have to run each of the scripts a total of 3 times to start to get the data and such
No you have to create the MRTG Index file, use this command to do so. this is all one line. Also you may want to chage where it say “MediaCenter” to the name of your pc.
Now create the mrtg config file.
Last but not least you need to add the cron job. This will run the job every 5 mins.
*/5 * * * * /bin/run-parts /etc/cron.mrtg 1> /dev/null
If evertyhing went correctly you should be able to open your browser and then goto http://localhost/mrtg/ and see the graphs. There have been times where I have HAD to reboot befoer it would start working but usually it will start with no problems. Enjoy