Mrtg Error Logs
Contents |
Party Docs Support Github Project Sponsors Cast Gold Sponsors Silver Sponsors ... oss.oetiker.ch Web MRTG 2.17.4 configuration reference check_mrtgtraf unable to open mrtg log file nagios OVERVIEW The runtime behaviour of MRTG is governed by a mrtg options configuration file. Run-of-the-mill configuration files can be generated with cfgmaker. (Check cfgmaker). But for more mrtg configuration in windows step by step elaborate configurations some hand-tuning is required. This document describes all the configuration options understood by the mrtg software. SYNTAX MRTG configuration file syntax follows some simple
Indexmaker Mrtg
rules: Keywords must start at the beginning of a line. Lines which follow a keyword line which start with a blank are appended to the keyword line Empty Lines are ignored Lines starting with a # sign are comments. You can add other files into the configuration file using Include: file Example: check_mrtgtraf unable to open mrtg log file ubuntu Include: base-options.inc If included files are specified with relative paths, both the current working directory and the directory containing the main config file will be searched for the files. The current working directory will be searched first. If the included filename contains an asterisk, then this is taken as a wildcard for zero or more characters, and all matching files are included. Thus, you can use this statement to include all files in a specified subdirectory. Example: Include: servers/*.cfg In this case, you should be very careful that your wildcard pattern does not find a match relative to the current working directory if you mean it to be relative to the main config file directory, since the working directory is checked for a match first (as with a normal Include directive). Therefore, use of something like '*/*' is discouraged. GLOBAL KEYWORDS WorkDir WorkDir specifies where the logfiles and the webpages should be
• All times are UTC - 6 hours [ DST ] Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Start here for a quick overview of the site Help Center Detailed answers to any questions you might have http://serverfault.com/questions/341514/unable-to-open-mrtg-log-file-error-with-nagios-and-mrtg Meta Discuss the workings and policies of this site About Us http://www.debianadmin.com/mrtg-installation-and-configuration-in-debian-based-distributions-2.html Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Server Fault Questions Tags Users Badges Unanswered Ask Question _ Server Fault is a question and answer site for system and network administrators. Join them; it only takes unable to a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top “Unable to open MRTG log file” error with nagios and mrtg up vote 2 down vote favorite We have a strange issue with our setup of icinga / nagios and unable to open mrtg. Icinga is working great and has no problem, it can monitor basically everything without issues. We setup mrtg to gather bandwith data from our routers and switches. MRTG is working fine: it stores the log data in the /var/www/mrtg/ directory and displays the graph data via web. We assume so MRTG is doing great. We tried to setup bandwidth checks in nagios: define service{ use generic-service ; Inherit values from a template host_name zywall-agora service_description ZYWALL AGORA TRAFFICO check_command check_local_mrtgtraf!/var/www/mrtg/x.x.x.x_2.log!AVG!1000000,2000000!5000000,5000000!1000 check_interval 1 ; Check the service every 1 minute under normal conditions retry_interval 1 ; Re-check every minute until its final/hard state is determined } Where /var/www/mrtg/x.x.x.x_2.log is the correct log path file. We keep on getting Unable to open MRTG log file error in the test result in icinga web interface. We tried everything: give ownership to user nagios or icinga to the log file give chmod 777 to the file try to copy the file in another directory and give it full permission Same error. The s
comments Sep 102006 Sponsored Link This article is focusing installing and configure MRTG with CPU,Memory and Disk Usage Graphs examples for Debian Ubuntu and Kubuntu Users and may be work for some debian based distributions. MRTG is Multi Router Traffic Grapher (MRTG) is a tool to monitor the traffic load on network links. MRTG generates HTML pages containing PNG images which provide a LIVE visual representation of this traffic. MRTG Requirements Apache webserver with perl support NET-SNMP GD Libpng zlib If you want to download MRTG you can download from here Preparing you System for MRTG Instalaltion First you need to install the required compilers #apt-get install gcc make g++ Apache 2 Installation with perl support Follow these instructions to install apache2 with perl support MRTG Installation Now we need to install mrtg and snmp Installing MRTG in Debian, Ubuntu and Kubuntu #apt-get install mrtg snmpd The installation will create an mrtg subdirectory where the Apache Web pages reside. On your Debian,ubnutu,kubuntu systems the path of this subdirectory is: /var/www/mrtg Now you need to edit the mrtg configuration file to edit the some of the settings File is located at /etc/mrtg.cfg you need to change the global settings as follows # Global Settings RunAsDaemon: yes EnableIPv6: no WorkDir: /var/www/mrtg Options[_]: bits,growright WriteExpires: Yes Title[^]: Traffic Analysis for You will find a crontab running every 5 minutes as user root # cat /etc/cron.d/mrtg 0-55/5 * * * * root if [ -x /usr/bin/mrtg ] && [ -r /etc/mrtg.cfg ]; then env LANG=C /usr/bin/mrtg /etc/mrtg.cfg >> /var/log/mrtg/mrtg.log 2>&1; fi Now we need to assign the snmp community name in snmp configration file /etc/snmp/snmpd.conf # sec.name source community # com2sec paranoid default public com2sec readonly default public #com2sec readwrite default private Now you need to restart the snmp service #/etc/init.d/snmpd restart The configuration file creating using #cfgmaker [emailprotected] > /etc/mrtg.cfg Creating a configuration file for a device using cfgmaker #cfgmaker [emailprotected] >> /etc/mrtg.cfg With the configuration file created correctly there's only one other thing you have to do and that's to use the indexmaker utility to create the summary home page. Since you have to re-run this command every time you make certain changes to the /etc/mrtg.cfg configuration file. Creating index file for the webserver using indexmaker #indexmaker /etc/mrtg.cfg > /var/www/mrtg/index.html Now you need to reboot your system wait for five minutes or so and then take a look at your summary home page.