Menu

how to map a rrd file to a service when the rrd name is different than the service?

Help
2014-01-13
2014-01-23
  • Bob Bilbrey

    Bob Bilbrey - 2014-01-13

    In /etc/nagiosgraph/datasetdb.conf I have the following: service=Bandwidth Check VMF-CORE-SW4 Gi1/0/1&db=192.168.2.46_gi1_1_1.rrd,ds0 . In /etc/nagiosgraph/hostdb.conf: service=Bandwidth Check VMF-CORE-SW4 Gi1/0/1&db=192.168.2.46_gi1_1_1.rrd. The debug output shows that it is looking for a file that does not exist. The file is created and updated via mrtg, I just want to display the data in the nagios interface associated with the service. The debug output is : Mon Jan 13 07:20:37 2014 showgraph.cgi error cannot open directory /var/www/mrtg/VMF-CORE-SW4: No such file or directory
    Mon Jan 13 07:20:37 2014 showgraph.cgi debug dbfilelist = [];
    Mon Jan 13 07:20:37 2014 showgraph.cgi debug rrdline params = {
    'geom' => '',
    'db' => [],
    'graphonly' => '',
    'showtitle' => '',
    'showdesc' => '',
    'group' => '',
    'fixedscale' => '',
    'expand_period' => '',
    'offset' => 0,
    'expand_controls' => '',
    'rrdopts' => ' -snow-118800 -enow-0 -t Bandwidth Check VMF:CORE:SW4 Gi1/0/1 on VMF:CORE:SW4',
    'period' => '',
    'hidelegend' => '',
    'service' => 'Bandwidth Check VMF-CORE-SW4 Gi1/0/1',
    'host' => 'VMF-CORE-SW4',
    'showgraphtitle' => '',
    'label' => []
    };
    Mon Jan 13 07:20:37 2014 showgraph.cgi debug graphinfo: host=VMF-CORE-SW4 service=Bandwidth Check VMF-CORE-SW4 Gi1/0/1
    Mon Jan 13 07:20:37 2014 showgraph.cgi debug graphinfo: db = [];
    Mon Jan 13 07:20:37 2014 showgraph.cgi debug dbfilelist(VMF-CORE-SW4, Bandwidth Check VMF-CORE-SW4 Gi1/0/1)
    Mon Jan 13 07:20:37 2014 showgraph.cgi debug dbfilelist scanning /var/www/mrtg/VMF-CORE-SW4 for Bandwidth%20Check%20VMF-CORE-SW4%20%20Gi1%2F0%2F1___

    How do I get it to map to the proper file?
    Thanks, Bob

     
  • Alan Brenner

    Alan Brenner - 2014-01-15

    Does the /var/www/mrtg/VMF-CORE-SW4 directory exist? Does it have a Bandwidth%20Check%20VMF-CORE-SW4%20%20Gi1%2F0%2F1___ file in it? Have you tried symbolic links to go from where Nagiosgraph is looking to where mrtg is storing the data.

     
  • Bob Bilbrey

    Bob Bilbrey - 2014-01-23

    So I created a bash script that maps the mrtg file to where nagiosgraph is looking for it, but I don't quite understand which conf to perform the mapping so that nagiosgraph actually reads the symlink correctly. An example constructed url:http://usvcnagios/nagiosgraph/cgi-bin/show.cgi?host=nvs-usvc-trl01-00-a01&service=vl999&db=vl999&period=day,week,month,year&expand_period=day,week,month,year yields no results. I feel like I am so close to a solution, but just can't seem to touch it. The symlink is in the host parent directory and is named vl999___.rrd.

     

Log in to post a comment.