IMG 1010 - Installing MRTG
- 1 Prerequisite
- 2 Procedure:
- 3 Troubleshooting
- 3.1 Are the MRTG output files in the directory?
- 3.2 Is MRTG installed correctly?
- 3.3 Are the Stats Files being created?
- 3.4 Is the stats frequency setup correctly?
- 3.5 Check the cronjob
- 3.6 Manually starting the Cronjob if needed
- 3.7 Verify the mrtg_bin and mrtg_logs directories have write access
- 3.8 Verify the dialogicmrtg.cfg was created
Prerequisite
Upgrade GCEMS to the latest version (minimum of GCEMS 10.3.1.121)
MRTG is not supported on CentOS
If using 10.5.1 + software the cantata folder will be changed to dialogic
Procedure:
Login as root
Go to the following directory: /usr/local/src
Run the installMrtg.sh script./installMrtg.sh
Verify contents of directory by typing:ls there should be 5 directories: gd libpng zlib mrtg tarFiles
Start GCEMS
Create the MRTG configuration file and HTML files
In ClientView, go to the Dialogic EMS pane and click the “MRTG Scripts” button
Setup an MRTG Web Host. See IMG 1010 - Setting Up An MRTG Web Host.
Troubleshooting
Are the MRTG output files in the directory?
Go to directory
/opt/dialogic/common/mrtg_logs (Software 10.5.0)Enter the ls command
There should be many . png and .html files
If the files are not there, then continue on with this troubleshooting guide
If the files are there you can open them with a local Web Browser, or you can configure the Apache Web server, please see the other installation document for that.
Is MRTG installed correctly?
Go to directory
/usr/local/srcEnter the ls command 'ls'
Verify the following directories got created: gd, llibpng, zlib, mrtg and tarFiles
If directories did not get created, something went wrong with the MRTG installation. Enter the “ whereis gcc” command. Verify the following gcc: /usr/bin/gcc
If gcc is not found, there is no compiler and you need to download a compiler on to the GCEMS. This also indicates that this was not a standard install.
If gcc is found, verify the directory is in the PATH by “printenv PATH”. Verify /usr/bin is in the path. Add this to the path if not present by entering the following command:
PATH=$PATH:/usr/bin
Are the Stats Files being created?
Go to directory
/opt/dialogic/common/statsShow the directory contents by entering the following command:
lsVerify there are a number of .csv files. If one of the .csv files is opened, there should be entries for that variable printed every 5 minutes.
Is the stats frequency setup correctly?
Go to directory
/opt/dialogic/common (Software 10.5.0)Edit the Defaults file – the file should have the following line in it
STATS_FREQUENCY:5If it is not set correctly change it and restart the GCEMS.
Check the cronjob
Open the cronjob file by typing:
crontab –lYou should see a line like the following:
*/5 * * * * env LANG=C /usr/local/src/mrtg/bin/mrtg /opt/dialogic/common/mrtg_bin/dialogicmrtg.cfg -- logging /opt/dialogic/common/log/mrtg.log > /dev/null 2>&1
Manually starting the Cronjob if needed
Type the following:
crontab<<EOF
*/5 * * * * env LANG=C /usr/local/src/mrtg/bin/mrtg /opt/dialogic/common/mrtg_bin/dialogicmrtg.cfg -- logging /opt/dialogic/common/log/mrtg.log > /dev/null 2>&1 EOF
Verify the mrtg_bin and mrtg_logs directories have write access
Go to directory:
/opt/dialogic/common (Software 10.5.0)Show all directory settings by typing:
ls -alIf all the directories do not have read/write/execute privileges change it
Login as ROOT
chmod 777 mrtg_bin
chmod 777 mrtg_log
Verify the dialogicmrtg.cfg was created
Go to directory:
/opt/dialogic/common/mrtg_bin (Software 10.5.0)Show the directory contents by typing:
lsMake sure there is a file called dialogicmrtg.cfg
If this file is not here, then see step 3 of the installation section.