check_mrtgtraf: configuration broken

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
flounders
Posts: 9
Joined: Mon Mar 10, 2014 1:12 pm

Re: check_mrtgtraf: configuration broken

Post by flounders »

Code: Select all

# Created by 
# /usr/bin/cfgmaker --global "WorkDir: /var/www/mrtg" --output /etc/mrtg/mrtg.cfg [email protected]


### Global Config Options

#  for UNIX
# WorkDir: /home/http/mrtg

#  or for NT
# WorkDir: c:\mrtgdata
                                                                                                                                                                                    
### Global Defaults                                                                                                                                                                 
                                                                                                                                                                                    
#  to get bits instead of bytes and graphs growing to the right                                                                                                                     
# Options[_]: growright, bits                                                                                                                                                       
                                                                                                                                                                                    
EnableIPv6: no                                                                                                                                                                      
WorkDir: /var/www/mrtg                                                                                                                                                              
                                                                                                                                                                                    
######################################################################                                                                                                              
# System:                                                                                                                                                                           
# Description: GSM7312 L3 Managed Gigabit Switch                                                                                                                                    
# Contact:                                                                                                                                                                          
# Location: 
######################################################################


### Interface 1 >> Descr: 'Unit:-1-Slot:-0-Port:-1-Gigabit---Level' | Name: '1/0/1' | Ip: '' | Eth: '' ###

Target[10.0.2.254_1]: 1:[email protected]:
SetEnv[10.0.2.254_1]: MRTG_INT_IP="" MRTG_INT_DESCR="Unit:-1-Slot:-0-Port:-1-Gigabit---Level"
MaxBytes[10.0.2.254_1]: 125000000
Title[10.0.2.254_1]: Traffic Analysis for 1 -- 
PageTop[10.0.2.254_1]: <h1>Traffic Analysis for 1 -- </h1>
                <div id="sysdetails">
                        <table>
                                <tr>
                                        <td>System:</td>
                                        <td> in </td>
                                </tr>
                                <tr>
                                        <td>Maintainer:</td>
                                        <td></td>
                                </tr>
                                <tr>
                                        <td>Description:</td>
                                        <td>Unit:-1-Slot:-0-Port:-1-Gigabit---Level  </td>
                                </tr>
                                <tr>
                                        <td>ifType:</td>
                                        <td>ethernetCsmacd (6)</td>
                                </tr>
                                <tr>
                                        <td>ifName:</td>
                                        <td>1/0/1</td>
                                </tr>
                                <tr>
                                        <td>Max Speed:</td>
                                        <td>125.0 MBytes/s</td>
                                </tr>
                        </table>
                </div>


### Interface 2 >> Descr: 'Unit:-1-Slot:-0-Port:-2-Gigabit---Level' | Name: '1/0/2' | Ip: '' | Eth: '' ###
### The following interface is commented out because:
### * it is operationally DOWN
### * has a speed of 0 which makes no sense
# 
# Target[10.0.2.254_2]: 2:[email protected]:
# SetEnv[10.0.2.254_2]: MRTG_INT_IP="" MRTG_INT_DESCR="Unit:-1-Slot:-0-Port:-2-Gigabit---Level"
# MaxBytes[10.0.2.254_2]: 0
# Title[10.0.2.254_2]: Traffic Analysis for 2 -- 
# PageTop[10.0.2.254_2]: <h1>Traffic Analysis for 2 -- </h1>
#               <div id="sysdetails">
#                       <table>
#                               <tr>
#                                       <td>System:</td>
#                                       <td> in </td>
#                               </tr>
#                               <tr>
#                                       <td>Maintainer:</td>
#                                       <td></td>
#                               </tr>
#                               <tr>
#                                       <td>Description:</td>
#                                       <td>Unit:-1-Slot:-0-Port:-2-Gigabit---Level  </td>
#                               </tr>
#                               <tr>
#                                       <td>ifType:</td>
#                                       <td>ethernetCsmacd (6)</td>
#                               </tr>
#                               <tr>
#                                       <td>ifName:</td>
#                                       <td>1/0/2</td>
#                               </tr>
#                               <tr>
#                                       <td>Max Speed:</td>
#                                       <td>0.0 Bytes/s</td>
#                               </tr>
#                       </table>
#               </div>


### Interface 3 >> Descr: 'Unit:-1-Slot:-0-Port:-3-Gigabit---Level' | Name: '1/0/3' | Ip: '' | Eth: '' ###
### The following interface is commented out because:
### * it is operationally DOWN
### * has a speed of 0 which makes no sense
# 
# Target[10.0.2.254_3]: 3:[email protected]:
# SetEnv[10.0.2.254_3]: MRTG_INT_IP="" MRTG_INT_DESCR="Unit:-1-Slot:-0-Port:-3-Gigabit---Level"
# MaxBytes[10.0.2.254_3]: 0
# Title[10.0.2.254_3]: Traffic Analysis for 3 -- 
# PageTop[10.0.2.254_3]: <h1>Traffic Analysis for 3 -- </h1>
#               <div id="sysdetails">
#                       <table>
#                               <tr>
#                                       <td>System:</td>
#                                       <td> in </td>
#                               </tr>
#                               <tr>
#                                       <td>Maintainer:</td>
#                                       <td></td>
#                               </tr>
#                               <tr>
#                                       <td>Description:</td>
#                                       <td>Unit:-1-Slot:-0-Port:-3-Gigabit---Level  </td>
#                               </tr>
#                               <tr>
#                                       <td>ifType:</td>
#                                       <td>ethernetCsmacd (6)</td>
#                               </tr>
#                               <tr>
#                                       <td>ifName:</td>
#                                       <td>1/0/3</td>
#                               </tr>
#                               <tr>
#                                       <td>Max Speed:</td>
#                                       <td>0.0 Bytes/s</td>
#                               </tr>
#                       </table>
#               </div>


### Interface 4 >> Descr: 'Unit:-1-Slot:-0-Port:-4-Gigabit---Level' | Name: '1/0/4' | Ip: '' | Eth: '' ###
### The following interface is commented out because:
### * it is operationally DOWN
### * has a speed of 0 which makes no sense
# 
# Target[10.0.2.254_4]: 4:[email protected]:
# SetEnv[10.0.2.254_4]: MRTG_INT_IP="" MRTG_INT_DESCR="Unit:-1-Slot:-0-Port:-4-Gigabit---Level"
# MaxBytes[10.0.2.254_4]: 0
# Title[10.0.2.254_4]: Traffic Analysis for 4 -- 
# PageTop[10.0.2.254_4]: <h1>Traffic Analysis for 4 -- </h1>
#               <div id="sysdetails">
#                       <table>
#                               <tr>
#                                       <td>System:</td>
#                                       <td> in </td>
#                               </tr>
#                               <tr>
#                                       <td>Maintainer:</td>
#                                       <td></td>
#                               </tr>
#                               <tr>
#                                       <td>Description:</td>
#                                       <td>Unit:-1-Slot:-0-Port:-4-Gigabit---Level  </td>
#                               </tr>
#                               <tr>
#                                       <td>ifType:</td>
#                                       <td>ethernetCsmacd (6)</td>
#                               </tr>
#                               <tr>
#                                       <td>ifName:</td>
#                                       <td>1/0/4</td>
#                               </tr>
#                               <tr>
#                                       <td>Max Speed:</td>
#                                       <td>0.0 Bytes/s</td>
#                               </tr>
#                       </table>
#               </div>


### Interface 5 >> Descr: 'Unit:-1-Slot:-0-Port:-5-Gigabit---Level' | Name: '1/0/5' | Ip: '' | Eth: '' ###
### The following interface is commented out because:
### * it is operationally DOWN
### * has a speed of 0 which makes no sense
# 
# Target[10.0.2.254_5]: 5:[email protected]:
# SetEnv[10.0.2.254_5]: MRTG_INT_IP="" MRTG_INT_DESCR="Unit:-1-Slot:-0-Port:-5-Gigabit---Level"
# MaxBytes[10.0.2.254_5]: 0
# Title[10.0.2.254_5]: Traffic Analysis for 5 -- 
# PageTop[10.0.2.254_5]: <h1>Traffic Analysis for 5 -- </h1>
#               <div id="sysdetails">
#                       <table>
#                               <tr>
#                                       <td>System:</td>
#                                       <td> in </td>
#                               </tr>
#                               <tr>
#                                       <td>Maintainer:</td>
#                                       <td></td>
#                               </tr>
#                               <tr>
#                                       <td>Description:</td>
#                                       <td>Unit:-1-Slot:-0-Port:-5-Gigabit---Level  </td>
#                               </tr>
#                               <tr>
#                                       <td>ifType:</td>
#                                       <td>ethernetCsmacd (6)</td>
#                               </tr>
#                               <tr>
#                                       <td>ifName:</td>
#                                       <td>1/0/5</td>
#                               </tr>
#                               <tr>
#                                       <td>Max Speed:</td>
#                                       <td>0.0 Bytes/s</td>
#                               </tr>
#                       </table>
#               </div>


### Interface 6 >> Descr: 'Unit:-1-Slot:-0-Port:-6-Gigabit---Level' | Name: '1/0/6' | Ip: '' | Eth: '' ###

Target[10.0.2.254_6]: 6:[email protected]:
SetEnv[10.0.2.254_6]: MRTG_INT_IP="" MRTG_INT_DESCR="Unit:-1-Slot:-0-Port:-6-Gigabit---Level"
MaxBytes[10.0.2.254_6]: 12500000
Title[10.0.2.254_6]: Traffic Analysis for 6 -- 
PageTop[10.0.2.254_6]: <h1>Traffic Analysis for 6 -- </h1>
                <div id="sysdetails">
                        <table>
                                <tr>
                                        <td>System:</td>
                                        <td> in </td>
                                </tr>
                                <tr>
                                        <td>Maintainer:</td>
                                        <td></td>
                                </tr>
                                <tr>
                                        <td>Description:</td>
                                        <td>Unit:-1-Slot:-0-Port:-6-Gigabit---Level  </td>
                                </tr>
                                <tr>
                                        <td>ifType:</td>
                                        <td>ethernetCsmacd (6)</td>
                                </tr>
                                <tr>
                                        <td>ifName:</td>
                                        <td>1/0/6</td>
                                </tr>
                                <tr>
                                        <td>Max Speed:</td>
                                        <td>12.5 MBytes/s</td>
                                </tr>
                        </table>
                </div>


### Interface 7 >> Descr: 'Unit:-1-Slot:-0-Port:-7-Gigabit---Level' | Name: '1/0/7' | Ip: '' | Eth: '' ###
### The following interface is commented out because:
### * it is operationally DOWN
### * has a speed of 0 which makes no sense
# 
# Target[10.0.2.254_7]: 7:[email protected]:
# SetEnv[10.0.2.254_7]: MRTG_INT_IP="" MRTG_INT_DESCR="Unit:-1-Slot:-0-Port:-7-Gigabit---Level"
# MaxBytes[10.0.2.254_7]: 0
# Title[10.0.2.254_7]: Traffic Analysis for 7 -- 
# PageTop[10.0.2.254_7]: <h1>Traffic Analysis for 7 -- </h1>
#               <div id="sysdetails">
#                       <table>
#                               <tr>
#                                       <td>System:</td>
#                                       <td> in </td>
#                               </tr>
#                               <tr>
#                                       <td>Maintainer:</td>
#                                       <td></td>
#                               </tr>
#                               <tr>
#                                       <td>Description:</td>
#                                       <td>Unit:-1-Slot:-0-Port:-7-Gigabit---Level  </td>
#                               </tr>
#                               <tr>
#                                       <td>ifType:</td>
#                                       <td>ethernetCsmacd (6)</td>
#                               </tr>
#                               <tr>
#                                       <td>ifName:</td>
#                                       <td>1/0/7</td>
#                               </tr>
#                               <tr>
#                                       <td>Max Speed:</td>
#                                       <td>0.0 Bytes/s</td>
#                               </tr>
#                       </table>
#               </div>


### Interface 8 >> Descr: 'Unit:-1-Slot:-0-Port:-8-Gigabit---Level' | Name: '1/0/8' | Ip: '' | Eth: '' ###
### The following interface is commented out because:
### * it is operationally DOWN
### * has a speed of 0 which makes no sense
# 
# Target[10.0.2.254_8]: 8:[email protected]:
# SetEnv[10.0.2.254_8]: MRTG_INT_IP="" MRTG_INT_DESCR="Unit:-1-Slot:-0-Port:-8-Gigabit---Level"
# MaxBytes[10.0.2.254_8]: 0
# Title[10.0.2.254_8]: Traffic Analysis for 8 -- 
# PageTop[10.0.2.254_8]: <h1>Traffic Analysis for 8 -- </h1>
#               <div id="sysdetails">
#                       <table>
#                               <tr>
#                                       <td>System:</td>
#                                       <td> in </td>
#                               </tr>
#                               <tr>
#                                       <td>Maintainer:</td>
#                                       <td></td>
#                               </tr>
#                               <tr>
#                                       <td>Description:</td>
#                                       <td>Unit:-1-Slot:-0-Port:-8-Gigabit---Level  </td>
#                               </tr>
#                               <tr>
#                                       <td>ifType:</td>
#                                       <td>ethernetCsmacd (6)</td>
#                               </tr>
#                               <tr>
#                                       <td>ifName:</td>
#                                       <td>1/0/8</td>
#                               </tr>
#                               <tr>
#                                       <td>Max Speed:</td>
#                                       <td>0.0 Bytes/s</td>
#                               </tr>
#                       </table>
#               </div>


### Interface 9 >> Descr: 'Unit:-1-Slot:-0-Port:-9-Gigabit---Level' | Name: '1/0/9' | Ip: '' | Eth: '' ###

Target[10.0.2.254_9]: 9:[email protected]:
SetEnv[10.0.2.254_9]: MRTG_INT_IP="" MRTG_INT_DESCR="Unit:-1-Slot:-0-Port:-9-Gigabit---Level"
MaxBytes[10.0.2.254_9]: 125000000
Title[10.0.2.254_9]: Traffic Analysis for 9 -- 
PageTop[10.0.2.254_9]: <h1>Traffic Analysis for 9 -- </h1>
                <div id="sysdetails">
                        <table>
                                <tr>
                                        <td>System:</td>
                                        <td> in </td>
                                </tr>
                                <tr>
                                        <td>Maintainer:</td>
                                        <td></td>
                                </tr>
                                <tr>
                                        <td>Description:</td>
                                        <td>Unit:-1-Slot:-0-Port:-9-Gigabit---Level  </td>
                                </tr>
                                <tr>
                                        <td>ifType:</td>
                                        <td>ethernetCsmacd (6)</td>
                                </tr>
                                <tr>
                                        <td>ifName:</td>
                                        <td>1/0/9</td>
                                </tr>
                                <tr>
                                        <td>Max Speed:</td>
                                        <td>125.0 MBytes/s</td>
                                </tr>
                        </table>
                </div>


### Interface 10 >> Descr: 'Unit:-1-Slot:-0-Port:-10-Gigabit---Level' | Name: '1/0/10' | Ip: '' | Eth: '' ###

Target[10.0.2.254_10]: 10:[email protected]:
SetEnv[10.0.2.254_10]: MRTG_INT_IP="" MRTG_INT_DESCR="Unit:-1-Slot:-0-Port:-10-Gigabit---Level"
MaxBytes[10.0.2.254_10]: 125000000
Title[10.0.2.254_10]: Traffic Analysis for 10 -- 
PageTop[10.0.2.254_10]: <h1>Traffic Analysis for 10 -- </h1>
                <div id="sysdetails">
                        <table>
                                <tr>
                                        <td>System:</td>
                                        <td> in </td>
                                </tr>
                                <tr>
                                        <td>Maintainer:</td>
                                        <td></td>
                                </tr>
                                <tr>
                                        <td>Description:</td>
                                        <td>Unit:-1-Slot:-0-Port:-10-Gigabit---Level  </td>
                                </tr>
                                <tr>
                                        <td>ifType:</td>
                                        <td>ethernetCsmacd (6)</td>
                                </tr>
                                <tr>
                                        <td>ifName:</td>
                                        <td>1/0/10</td>
                                </tr>
                                <tr>
                                        <td>Max Speed:</td>
                                        <td>125.0 MBytes/s</td>
                                </tr>
                        </table>
                </div>


### Interface 11 >> Descr: 'Unit:-1-Slot:-0-Port:-11-Gigabit---Level' | Name: '1/0/11' | Ip: '' | Eth: '' ###

Target[10.0.2.254_11]: 11:[email protected]:
SetEnv[10.0.2.254_11]: MRTG_INT_IP="" MRTG_INT_DESCR="Unit:-1-Slot:-0-Port:-11-Gigabit---Level"
MaxBytes[10.0.2.254_11]: 125000000
Title[10.0.2.254_11]: Traffic Analysis for 11 -- 
PageTop[10.0.2.254_11]: <h1>Traffic Analysis for 11 -- </h1>
                <div id="sysdetails">
                        <table>
                                <tr>
                                        <td>System:</td>
                                        <td> in </td>
                                </tr>
                                <tr>
                                        <td>Maintainer:</td>
                                        <td></td>
                                </tr>
                                <tr>
                                        <td>Description:</td>
                                        <td>Unit:-1-Slot:-0-Port:-11-Gigabit---Level  </td>
                                </tr>
                                <tr>
                                        <td>ifType:</td>
                                        <td>ethernetCsmacd (6)</td>
                                </tr>
                                <tr>
                                        <td>ifName:</td>
                                        <td>1/0/11</td>
                                </tr>
                                <tr>
                                        <td>Max Speed:</td>
                                        <td>125.0 MBytes/s</td>
                                </tr>
                        </table>
                </div>


### Interface 12 >> Descr: 'Unit:-1-Slot:-0-Port:-12-Gigabit---Level' | Name: '1/0/12' | Ip: '' | Eth: '' ###

Target[10.0.2.254_12]: 12:[email protected]:
SetEnv[10.0.2.254_12]: MRTG_INT_IP="" MRTG_INT_DESCR="Unit:-1-Slot:-0-Port:-12-Gigabit---Level"
MaxBytes[10.0.2.254_12]: 125000000
Title[10.0.2.254_12]: Traffic Analysis for 12 -- 
PageTop[10.0.2.254_12]: <h1>Traffic Analysis for 12 -- </h1>
                <div id="sysdetails">
                        <table>
                                <tr>
                                        <td>System:</td>
                                        <td> in </td>
                                </tr>
                                <tr>
                                        <td>Maintainer:</td>
                                        <td></td>
                                </tr>
                                <tr>
                                        <td>Description:</td>
                                        <td>Unit:-1-Slot:-0-Port:-12-Gigabit---Level  </td>
                                </tr>
                                <tr>
                                        <td>ifType:</td>
                                        <td>ethernetCsmacd (6)</td>
                                </tr>
                                <tr>
                                        <td>ifName:</td>
                                        <td>1/0/12</td>
                                </tr>
                                <tr>
                                        <td>Max Speed:</td>
                                        <td>125.0 MBytes/s</td>
                                </tr>
                        </table>
                </div>


### Interface 27 >> Descr: '-CPU-Interface-for-Unit:-1-Slot:-3-Port:-1' | Name: 'CPU Interface:  1/3/1' | Ip: '192.168.1.1' | Eth: '30-78-30-30-32-32-33-66-30-38-36-63-64-38' ###
### The following interface is commented out because:
### * has a speed of 0 which makes no sense
# 
# Target[10.0.2.254_27]: 27:[email protected]:
# SetEnv[10.0.2.254_27]: MRTG_INT_IP="192.168.1.1" MRTG_INT_DESCR="-CPU-Interface-for-Unit:-1-Slot:-3-Port:-1"
# MaxBytes[10.0.2.254_27]: 0
# Title[10.0.2.254_27]: Traffic Analysis for 27 -- 
# PageTop[10.0.2.254_27]: <h1>Traffic Analysis for 27 -- </h1>
#               <div id="sysdetails">
#                       <table>
#                               <tr>
#                                       <td>System:</td>
#                                       <td> in </td>
#                               </tr>
#                               <tr>
#                                       <td>Maintainer:</td>
#                                       <td></td>
#                               </tr>
#                               <tr>
#                                       <td>Description:</td>
#                                       <td>-CPU-Interface-for-Unit:-1-Slot:-3-Port:-1  </td>
#                               </tr>
#                               <tr>
#                                       <td>ifType:</td>
#                                       <td>Other (1)</td>
#                               </tr>
#                               <tr>
#                                       <td>ifName:</td>
#                                       <td>CPU Interface:  1/3/1</td>
#                               </tr>
#                               <tr>
#                                       <td>Max Speed:</td>
#                                       <td>0.0 Bytes/s</td>
#                               </tr>
#                               <tr>
#                                       <td>Ip:</td>
#                                       <td>192.168.1.1 ()</td>
#                               </tr>
#                       </table>
#               </div>


### Interface 34 >> Descr: '' | Name: 'VLAN- 4' | Ip: '10.65.4.254' | Eth: '' ###

Target[10.0.2.254_34]: 34:[email protected]:
SetEnv[10.0.2.254_34]: MRTG_INT_IP="10.65.4.254" MRTG_INT_DESCR=""
MaxBytes[10.0.2.254_34]: 1250000
Title[10.0.2.254_34]: Traffic Analysis for 34 -- 
PageTop[10.0.2.254_34]: <h1>Traffic Analysis for 34 -- </h1>
                <div id="sysdetails">
                        <table>
                                <tr>
                                        <td>System:</td>
                                        <td> in </td>
                                </tr>
                                <tr>
                                        <td>Maintainer:</td>
                                        <td></td>
                                </tr>
                                <tr>
                                        <td>Description:</td>
                                        <td>  </td>
                                </tr>
                                <tr>
                                        <td>ifType:</td>
                                        <td>Layer 2 Virtual LAN using 802.1Q (135)</td>
                                </tr>
                                <tr>
                                        <td>ifName:</td>
                                        <td>VLAN- 4</td>
                                </tr>
                                <tr>
                                        <td>Max Speed:</td>
                                        <td>1250.0 kBytes/s</td>
                                </tr>
                                <tr>
                                        <td>Ip:</td>
                                        <td>10.65.4.254 ()</td>
                                </tr>
                        </table>
                </div>


### Interface 35 >> Descr: '' | Name: 'VLAN- 132' | Ip: '' | Eth: '' ###
### The following interface is commented out because:
### * it is operationally DOWN
# 
# Target[10.0.2.254_35]: 35:[email protected]:
# SetEnv[10.0.2.254_35]: MRTG_INT_IP="" MRTG_INT_DESCR=""
# MaxBytes[10.0.2.254_35]: 1250000
# Title[10.0.2.254_35]: Traffic Analysis for 35 -- 
# PageTop[10.0.2.254_35]: <h1>Traffic Analysis for 35 -- </h1>
#               <div id="sysdetails">
#                       <table>
#                               <tr>
#                                       <td>System:</td>
#                                       <td> in </td>
#                               </tr>
#                               <tr>
#                                       <td>Maintainer:</td>
#                                       <td></td>
#                               </tr>
#                               <tr>
#                                       <td>Description:</td>
#                                       <td>  </td>
#                               </tr>
#                               <tr>
#                                       <td>ifType:</td>
#                                       <td>Layer 2 Virtual LAN using 802.1Q (135)</td>
#                               </tr>
#                               <tr>
#                                       <td>ifName:</td>
#                                       <td>VLAN- 132</td>
#                               </tr>
#                               <tr>
#                                       <td>Max Speed:</td>
#                                       <td>1250.0 kBytes/s</td>
#                               </tr>
#                       </table>
#               </div>


### Interface 36 >> Descr: '' | Name: 'VLAN- 71' | Ip: '10.10.71.254' | Eth: '' ###

Target[10.0.2.254_36]: 36:[email protected]:
SetEnv[10.0.2.254_36]: MRTG_INT_IP="10.10.71.254" MRTG_INT_DESCR=""
MaxBytes[10.0.2.254_36]: 1250000
Title[10.0.2.254_36]: Traffic Analysis for 36 -- 
PageTop[10.0.2.254_36]: <h1>Traffic Analysis for 36 -- </h1>
                <div id="sysdetails">
                        <table>
                                <tr>
                                        <td>System:</td>
                                        <td> in </td>
                                </tr>
                                <tr>
                                        <td>Maintainer:</td>
                                        <td></td>
                                </tr>
                                <tr>
                                        <td>Description:</td>
                                        <td>  </td>
                                </tr>
                                <tr>
                                        <td>ifType:</td>
                                        <td>Layer 2 Virtual LAN using 802.1Q (135)</td>
                                </tr>
                                <tr>
                                        <td>ifName:</td>
                                        <td>VLAN- 71</td>
                                </tr>
                                <tr>
                                        <td>Max Speed:</td>
                                        <td>1250.0 kBytes/s</td>
                                </tr>
                                <tr>
                                        <td>Ip:</td>
                                        <td>10.10.71.254 ()</td>
                                </tr>
                        </table>
                </div>


### Interface 37 >> Descr: '' | Name: 'VLAN- 1' | Ip: '10.0.2.254' | Eth: '' ###

Target[10.0.2.254_37]: 37:[email protected]:
SetEnv[10.0.2.254_37]: MRTG_INT_IP="10.0.2.254" MRTG_INT_DESCR=""
MaxBytes[10.0.2.254_37]: 1250000
Title[10.0.2.254_37]: Traffic Analysis for 37 -- 
PageTop[10.0.2.254_37]: <h1>Traffic Analysis for 37 -- </h1>
                <div id="sysdetails">
                        <table>
                                <tr>
                                        <td>System:</td>
                                        <td> in </td>
                                </tr>
                                <tr>
                                        <td>Maintainer:</td>
                                        <td></td>
                                </tr>
                                <tr>
                                        <td>Description:</td>
                                        <td>  </td>
                                </tr>
                                <tr>
                                        <td>ifType:</td>
                                        <td>Layer 2 Virtual LAN using 802.1Q (135)</td>
                                </tr>
                                <tr>
                                        <td>ifName:</td>
                                        <td>VLAN- 1</td>
                                </tr>
                                <tr>
                                        <td>Max Speed:</td>
                                        <td>1250.0 kBytes/s</td>
                                </tr>
                                <tr>
                                        <td>Ip:</td>
                                        <td>10.0.2.254 ()</td>
                                </tr>
                        </table>
                </div>


### Interface 38 >> Descr: '' | Name: 'VLAN- 12' | Ip: '10.65.12.254' | Eth: '' ###

Target[10.0.2.254_38]: 38:[email protected]:
SetEnv[10.0.2.254_38]: MRTG_INT_IP="10.65.12.254" MRTG_INT_DESCR=""
MaxBytes[10.0.2.254_38]: 1250000
Title[10.0.2.254_38]: Traffic Analysis for 38 -- 
PageTop[10.0.2.254_38]: <h1>Traffic Analysis for 38 -- </h1>
                <div id="sysdetails">
                        <table>
                                <tr>
                                        <td>System:</td>
                                        <td> in </td>
                                </tr>
                                <tr>
                                        <td>Maintainer:</td>
                                        <td></td>
                                </tr>
                                <tr>
                                        <td>Description:</td>
                                        <td>  </td>
                                </tr>
                                <tr>
                                        <td>ifType:</td>
                                        <td>Layer 2 Virtual LAN using 802.1Q (135)</td>
                                </tr>
                                <tr>
                                        <td>ifName:</td>
                                        <td>VLAN- 12</td>
                                </tr>
                                <tr>
                                        <td>Max Speed:</td>
                                        <td>1250.0 kBytes/s</td>
                                </tr>
                                <tr>
                                        <td>Ip:</td>
                                        <td>10.65.12.254 ()</td>
                                </tr>
                        </table>
                </div>
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: check_mrtgtraf: configuration broken

Post by sreinhardt »

Oh boy, we are missing several important parts at the top of the mrtg config. You should try modifying it to this:

Code: Select all

# Created by
# /usr/bin/cfgmaker --global "WorkDir: /var/www/mrtg" --output /etc/mrtg/mrtg.cfg [email protected]


### Global Config Options

#  for UNIX
# WorkDir: /home/http/mrtg

#  or for NT
# WorkDir: c:\mrtgdata

HtmlDir: /var/www/mrtg
ImageDir: /var/www/mrtg
LogFormat: rrdtool
LogDir: /var/lib/mrtg
ThreshDir: /var/lib/mrtg
WorkDir: /var/lib/mrtg
                                                                                                                                                                                   
### Global Defaults                                                                                                                                                                 
                                                                                                                                                                                   
#  to get bits instead of bytes and graphs growing to the right                                                                                                                     
# Options[_]: growright, bits                                                                                                                                                       
                                                                                                                                                                                   
EnableIPv6: no                                                                                                                                                                     
#WorkDir: /var/www/mrtg                                                                                                                                                             
                                                                                                                                                                                   
######################################################################       
### Leave everything below the above line alone, there is no need to modify it ###
Of course make sure those additional directories are created, or place them in other locations, but then once these changes are made, let's verify that we don't have errors.

Code: Select all

LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
flounders
Posts: 9
Joined: Mon Mar 10, 2014 1:12 pm

Re: check_mrtgtraf: configuration broken

Post by flounders »

The check_mrtgtraf command segfaults on the logs provided in /var/lib/mrtg with the rrd format.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: check_mrtgtraf: configuration broken

Post by sreinhardt »

What OS are you installing on? Also do you have the rrdtool libraries and such? perl-rrdtool, python-rrdtool, and rrdtool at the very least.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
flounders
Posts: 9
Joined: Mon Mar 10, 2014 1:12 pm

Re: check_mrtgtraf: configuration broken

Post by flounders »

The OS I am using is CentOS 6.5 64 bit. rrdtool with Perl and Python bindings are installed. Python bindings were missing. After installing all rrdtool packages (ruby, tcl, etc.), it still is segfaulting.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: check_mrtgtraf: configuration broken

Post by lmiltchev »

Can you run one more time the following command and show us the output?

Code: Select all

/path/to/nagios -v /path/to/nagios.cfg
Also, show us how the "check_mrtgtraf" is defined.
Be sure to check out our Knowledgebase for helpful articles and solutions!
flounders
Posts: 9
Joined: Mon Mar 10, 2014 1:12 pm

Re: check_mrtgtraf: configuration broken

Post by flounders »

Code: Select all

[root@localhost ~]# /usr/sbin/nagios -v /etc/nagios/nagios.cfg 

Nagios Core 3.5.1
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-30-2013
License: GPL

Website: http://www.nagios.org
Reading configuration data...
   Read main config file okay...
Processing object config file '/etc/nagios/objects/commands.cfg'...
Processing object config file '/etc/nagios/objects/contacts.cfg'...
Processing object config file '/etc/nagios/objects/timeperiods.cfg'...
Processing object config file '/etc/nagios/objects/templates.cfg'...
Processing object config file '/etc/nagios/objects/localhost.cfg'...
Processing object config file '/etc/nagios/objects/switch.cfg'...
Processing object config directory '/etc/nagios/servers'...
Processing object config file '/etc/nagios/servers/clients.cfg'...
Processing object config directory '/etc/nagios/conf.d'...
   Read object config files okay...

Running pre-flight check on configuration data...

Checking services...
        Checked 23 services.
Checking hosts...
Warning: Host 'client' has no services associated with it!
        Checked 3 hosts.
Checking host groups...
        Checked 2 host groups.
Checking service groups...
        Checked 0 service groups.
Checking contacts...
        Checked 1 contacts.
Checking contact groups...
        Checked 1 contact groups.
Checking service escalations...
        Checked 0 service escalations.
Checking service dependencies...
        Checked 0 service dependencies.
Checking host escalations...
        Checked 0 host escalations.
Checking host dependencies...
        Checked 0 host dependencies.
Checking commands...
        Checked 24 commands.
Checking time periods...
        Checked 5 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 1
Total Errors:   0

Things look okay - No serious problems were detected during the pre-flight check
Here is the switch.cfg for full context, but check_local_mrtgtraf is at the bottom:

Code: Select all

[root@localhost ~]# cat /etc/nagios/objects/switch.cfg
###############################################################################
# SWITCH.CFG - SAMPLE CONFIG FILE FOR MONITORING A SWITCH
#
# Last Modified: 10-03-2007
#
# NOTES: This config file assumes that you are using the sample configuration
#        files that get installed with the Nagios quickstart guide.
#
###############################################################################




###############################################################################
###############################################################################
#
# HOST DEFINITIONS
#
###############################################################################
###############################################################################

# Define the switch that we'll be monitoring

define host{
        use             generic-switch          ; Inherit default values from a template
        host_name       netgear-gsm7312         ; The name we're giving to this switch
        alias           Netgear GSM7312 Router  ; A longer name associated with the switch
        address         10.0.2.254              ; IP address of the switch
        hostgroups      switches                ; Host groups this switch is associated with
        }

###############################################################################
###############################################################################
#
# HOST GROUP DEFINITIONS
#
###############################################################################
###############################################################################

# Create a new hostgroup for switches

define hostgroup{
        hostgroup_name  switches                ; The name of the hostgroup
        alias           Network Switches        ; Long name of the group
        }




###############################################################################
###############################################################################
#
# SERVICE DEFINITIONS
#
###############################################################################
###############################################################################

# Create a service to PING to switch

define service{
        use                     generic-service ; Inherit values from a template
        host_name               netgear-gsm7312 ; The name of the host the service is associated with
        service_description     PING            ; The service description
        check_command           check_ping!200.0,20%!600.0,60%  ; The command used to monitor the service
        normal_check_interval   5               ; Check the service every 5 minutes under normal conditions
        retry_check_interval    1               ; Re-check the service every minute until its final/hard state is determined
        }


# Monitor uptime via SNMP

define service{
        use                     generic-service ; Inherit values from a template
        host_name               netgear-gsm7312
        service_description     Uptime
        check_command           check_snmp!-C public -o sysUpTime.0
        }



# Monitor Port 1 status via SNMP

define service{
        use                     generic-service ; Inherit values from a template
        host_name               netgear-gsm7312
        service_description     Port 1 Link Status
        check_command           check_snmp!-C public -o ifOperStatus.1 -r 1 -m RFC1213-MIB
        }


# Monitor Port 2 status via SNMP

define service{
        use                     generic-service ; Inherit values from a template
        host_name               netgear-gsm7312
        service_description     Port 2 Link Status
        check_command           check_snmp!-C public -o ifOperStatus.2 -r 1 -m RFC1213-MIB
        }


# Monitor Port 3 status via SNMP

define service{
        use                     generic-service ; Inherit values from a template
        host_name               netgear-gsm7312
        service_description     Port 3 Link Status
        check_command           check_snmp!-C public -o ifOperStatus.3 -r 1 -m RFC1213-MIB
        }


# Monitor Port 4 status via SNMP

define service{
        use                     generic-service ; Inherit values from a template
        host_name               netgear-gsm7312
        service_description     Port 4 Link Status
        check_command           check_snmp!-C public -o ifOperStatus.4 -r 1 -m RFC1213-MIB
        }

# Monitor Port 5 status via SNMP

define service{
        use                     generic-service ; Inherit values from a template
        host_name               netgear-gsm7312
        service_description     Port 5 Link Status
        check_command           check_snmp!-C public -o ifOperStatus.5 -r 1 -m RFC1213-MIB
        }

# Monitor Port 6 status via SNMP

define service{
        use                     generic-service ; Inherit values from a template
        host_name               netgear-gsm7312
        service_description     Port 6 Link Status
        check_command           check_snmp!-C public -o ifOperStatus.6 -r 1 -m RFC1213-MIB
        }


# Monitor Port 7 status via SNMP

define service{
        use                     generic-service ; Inherit values from a template
        host_name               netgear-gsm7312
        service_description     Port 7 Link Status
        check_command           check_snmp!-C public -o ifOperStatus.7 -r 1 -m RFC1213-MIB
        }


# Monitor Port 8 status via SNMP

define service{
        use                     generic-service ; Inherit values from a template
        host_name               netgear-gsm7312
        service_description     Port 8 Link Status
        check_command           check_snmp!-C public -o ifOperStatus.8 -r 1 -m RFC1213-MIB
        }


# Monitor Port 9 status via SNMP

define service{
        use                     generic-service ; Inherit values from a template
        host_name               netgear-gsm7312
        service_description     Port 9 Link Status
        check_command           check_snmp!-C public -o ifOperStatus.9 -r 1 -m RFC1213-MIB
        }


# Monitor Port 10 status via SNMP

define service{
        use                     generic-service ; Inherit values from a template
        host_name               netgear-gsm7312
        service_description     Port 10 Link Status
        check_command           check_snmp!-C public -o ifOperStatus.10 -r 1 -m RFC1213-MIB
        }


# Monitor Port 11 status via SNMP

define service{
        use                     generic-service ; Inherit values from a template
        host_name               netgear-gsm7312
        service_description     Port 11 Link Status
        check_command           check_snmp!-C public -o ifOperStatus.11 -r 1 -m RFC1213-MIB
        }


# Monitor Port 12 status via SNMP

define service{
        use                     generic-service ; Inherit values from a template
        host_name               netgear-gsm7312
        service_description     Port 12 Link Status
        check_command           check_snmp!-C public -o ifOperStatus.12 -r 1 -m RFC1213-MIB
        }


# Monitor bandwidth via MRTG logs

define service{
        use                     generic-service
        host_name               netgear-gsm7312
        service_description     Port 1 Bandwidth Usage
        check_command           check_local_mrtgtraf!/var/www/mrtg/10.0.2.254_1.log!AVG!1000000,1000000!5000000,5000000!10
       }
Edit:

commands.cfg check_local_mrtgtraf snippet:

Code: Select all

# 'check_local_mrtgtraf' command definition
define command{
        command_name    check_local_mrtgtraf
        command_line    $USER1$/check_mrtgtraf -F $ARG1$ -a $ARG2$ -w $ARG3$ -c $ARG4$ -e $ARG5$
        }
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: check_mrtgtraf: configuration broken

Post by lmiltchev »

We've been able to replicate the issue in house. Our plugins team is looking into this as we speak. We will get back to you as soon as we have a possible solution for you.
Be sure to check out our Knowledgebase for helpful articles and solutions!
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: check_mrtgtraf: configuration broken

Post by slansing »

I would recommend looking through the guide posted in this thread as it has worked for others while we are looking into the plugin:

http://www.howtoforge.com/forums/showthread.php?t=48484
Locked