No graph for Source

This support forum board is for support questions relating to Nagios Network Analyzer, our network traffic and bandwidth analysis solution.
ryanb
Posts: 33
Joined: Wed Feb 26, 2014 6:03 pm

Re: No graph for Source

Post by ryanb »

So, I figured out what the issue is. In initialize_source.py where rrdtool is called, there is no check for exceptions:

Code: Select all

     46 def create_bandwidth_db(directory, name='bandwidth.rrd'):
     47     '''Creates the bandwidth DB for the source'''
     48     rrdtool.create( os.path.join(directory, name),
     49                     '--no-overwrite',
     50                     '--step', '300',
     51                     'DS:flows:GAUGE:600:0:U',
     52                     'DS:bytes:GAUGE:600:0:U',
     53                     'DS:packets:GAUGE:600:0:U',
     54                     'DS:bps:GAUGE:600:0:U',
     55                     'DS:pps:GAUGE:600:0:U',
     56                     'DS:bpp:GAUGE:600:0:U',
     57                     'RRA:AVERAGE:0.5:1:17531',
     58                     'RRA:AVERAGE:0.5:12:4380',
     59                     'RRA:AVERAGE:0.5:288:365',
     60                     'RRA:HWPREDICT:1440:0.1:0.0035:288' )
It seems that the --no-overwrite option is not valid:

Code: Select all

ERROR:root:unknown option '--no-overwrite'
Traceback (most recent call last):
  File "./test_init.py", line 61, in create_bandwidth_db
    'RRA:HWPREDICT:1440:0.1:0.0035:288' )
error: unknown option '--no-overwrite'
RRD Tool failed: unknown option '--no-overwrite'
When I remote that option from the command, it works.
ryanb
Posts: 33
Joined: Wed Feb 26, 2014 6:03 pm

Re: No graph for Source

Post by ryanb »

So, interestingly, I have rrdtool installed on my system and it does seem to support that option:

Code: Select all

$ rrdcreate --help
RRDtool 1.4.9  Copyright by Tobi Oetiker, 1997-2010

Usage: rrdcreate <filename>
                        [--start|-b start time]
                        [--step|-s step]
                        [--no-overwrite]
                        [DS:ds-name:DST:dst arguments]
                        [RRA:CF:cf arguments]

ERROR: unknown option '--help'
However, that isn't what the script is using. It seems to be using a Python module, and according to pydoc rrdtool, that option is not supported:

Code: Select all


<stuff deleted>
FUNCTIONS
    create(...)
        create(args..): Set up a new Round Robin Database
        create filename [--start|-b start time] [--step|-s step] [DS:ds-name:DST:heartbeat:min:max] [RRA:CF:xff:steps:rows]
 <more irrelevant stuff deleted>

VERSION
    1.4.9

Please advise.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: No graph for Source

Post by ssax »

What is the output of this command?

Code: Select all

find /usr/local -name py_rrd*
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: No graph for Source

Post by ssax »

Also, what specific distro/version are you running?
ryanb
Posts: 33
Joined: Wed Feb 26, 2014 6:03 pm

Re: No graph for Source

Post by ryanb »

Running CentOS- fresh install from within the last few weeks. The only thing I installed has been NagiosXI, NA and Log Server. And also TCPDump for troubleshooting.

Code: Select all

# find /usr/local -name py_rrd*
/usr/local/lib64/python2.6/site-packages/py_rrdtool-0.2.2-py2.6.egg-info
# cat /etc/redhat-release
CentOS release 6.7 (Final)
Is rrdtool.create called on these files again at any time once they are created? If I have to manually create them using rrdtool from the commandline (or editing that script),that's fine. As long as it won't cause me a problem down the line.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: No graph for Source

Post by jdalrymple »

ryanb wrote:The only thing I installed has been NagiosXI, NA and Log Server.
On 1 host?

If so I think we found your problem... Our pieces of software integrate, but don't coexist well :)
ryanb
Posts: 33
Joined: Wed Feb 26, 2014 6:03 pm

Re: No graph for Source

Post by ryanb »

Oh, I see. Yeah, they are all on the same server. It's not an option for me to move these to separate servers, but if I have to make a few tweaks here and there it is not a big deal. Do you have any documentation that will tell me what I need to look for and do to solve any other glitches like this?

Also, if I just create the bandwidth.rrd files manually using rrdtool from the commandline, should everything work properly? Or will this issue crop up down the road?

Thanks,
Ryan
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: No graph for Source

Post by ssax »

It should work just fine as long as it's created with the same options and you set the permissions properly.
ryanb
Posts: 33
Joined: Wed Feb 26, 2014 6:03 pm

Re: No graph for Source

Post by ryanb »

OK, that works. I created a couple rrd files- in one case I used the script and just commented out the offending option, and in the other I copied and pasted the options into the commandline version of rrdtool. Both seem to be working fine.

Thanks for your help. Feel free to close this out.