barracuda spam firewall [without SNMP]

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

tuxer
Posts: 7
Joined: Tue Nov 07, 2006 10:31 am

Post by tuxer »

I have the same error that thaihoamai:

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Barracuda - Total Performance" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="# of Mails" \
--slope-mode \
DEF:a="/var/www/html/cacti/rra/barracuda_tagged_390.rrd":viruses:AVERAGE \
DEF:b="/var/www/html/cacti/rra/barracuda_tagged_390.rrd":quarantined:AVERAGE \
DEF:c="/var/www/html/cacti/rra/barracuda_tagged_390.rrd":tagged:AVERAGE \
DEF:d="/var/www/html/cacti/rra/barracuda_tagged_390.rrd":allowed:AVERAGE \
DEF:e="/var/www/html/cacti/rra/barracuda_tagged_390.rrd":blocked:AVERAGE \
CDEF:cdefa=a,60,* \
CDEF:cdefb=a,300,* \
CDEF:cdefe=b,60,* \
CDEF:cdeff=b,300,* \
CDEF:cdefi=c,60,* \
CDEF:cdefj=c,300,* \
CDEF:cdefbc=d,60,* \
CDEF:cdefbd=d,300,* \
CDEF:cdefbg=e,60,* \
CDEF:cdefbh=e,300,* \
AREA:cdefa#FF7D00:"Viruses" \
GPRINT:cdefb:LAST:" Current\:%8.00lf %s" \
GPRINT:cdefb:AVERAGE:"Average\:%8.00lf %s" \
GPRINT:cdefb:MAX:"Maximum\:%8.00lf %s\n" \
AREA:cdefe#862F2F:"Quarantined":STACK \
GPRINT:cdeff:LAST:"Current\:%8.0lf %s" \
GPRINT:cdeff:AVERAGE:"Average\:%8.0lf %s" \
GPRINT:cdeff:MAX:"Maximum\:%8.0lf %s\n" \
AREA:cdefi#00A348:"Tagged":STACK \
GPRINT:cdefj:LAST:" Current\:%8.0lf %s" \
GPRINT:cdefj:AVERAGE:"Average\:%8.0lf %s" \
GPRINT:cdefj:MAX:"Maximum\:%8.0lf %s\n" \
AREA:cdefbc#00FF00:"Allowed":STACK \
GPRINT:cdefbd:LAST:" Current\:%8.0lf %s" \
GPRINT:cdefbd:AVERAGE:"Average\:%8.0lf %s" \
GPRINT:cdefbd:MAX:"Maximum\:%8.0lf %s\n" \
AREA:cdefbg#6DC8FE:"Blocked":STACK \
GPRINT:cdefbh:LAST:" Current\:%8.0lf %s" \
GPRINT:cdefbh:AVERAGE:"Average\:%8.0lf %s" \
GPRINT:cdefbh:MAX:"Maximum\:%8.0lf %s\n"

RRDTool Says:

ERROR: opening '/var/www/html/cacti/rra/barracuda_tagged_390.rrd': No such file or directory


I tried to find if I have a duplicate rrd but it's not. could anyone help me?
User avatar
cpt_ahab
Cacti User
Posts: 61
Joined: Tue Feb 01, 2005 11:34 am

Post by cpt_ahab »

sometimes cacti does not create rrds,
because it checks via snmp if the host is up.
if no snmp then the host is down for cacti --> no rrd

you can change the upcheck to ping only.
under settings --> poller --> Downed Host detection
set it to ping only.

you can also give your cacti host barracuda an IP address of an host with snmp.
it doesnt affect the real data because you specify the IP adress at the script again.


greez ahab
cacti 0.8.6j ** cactid 0.8.6d ** rrdtool 1.2.15
Debain ** Apache 2 ** PHP 4.3.0
tuxer
Posts: 7
Joined: Tue Nov 07, 2006 10:31 am

Post by tuxer »

I've followed your advices and after to set up and do some php poller.php I can see the graphics but.... :( empties. it's quite strange because if I execute a php barracuda_perf.php ip upon my scripts directory I get results.


...... any suggestions....

Thanks in advance
bballard
Posts: 35
Joined: Thu Jan 19, 2006 11:58 am

Post by bballard »

Can someone export this from version 0.8.6i? I cannot use the posted version of 0.8.6h. Or can I? I get XML Parse errors.
Neilbo
Posts: 36
Joined: Fri Mar 23, 2007 3:31 pm

Have graphs no Data

Post by Neilbo »

I got all the templates installed but I am not graphing any data. Here is my debug.


RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Barracuda - Temperature" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=-10 \
--vertical-label="Temperatur" \
--slope-mode \
DEF:a="/var/www/html/rra/barracuda_sys_temperature_442.rrd":sys_temperature:AVERAGE \
LINE2:a#FF3932:"? C" \
GPRINT:a:LAST:"Current\:%8.2lf %s" \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:a:MAX:"Maximum\:%8.2lf %s\n"
RRDTool Says:

OK
flickerfly
Posts: 17
Joined: Thu Oct 19, 2006 8:44 am
Location: Lanham, MD
Contact:

Post by flickerfly »

These don't seem to import into the j version. Have you upgraded and can you export them for the j version for us? Thanks!
Neilbo
Posts: 36
Joined: Fri Mar 23, 2007 3:31 pm

Cacti Version 0.8.6i

Post by Neilbo »

I am currently running Cacti Version 0.8.6i. Did you want me to upgrade? Would this fix it?
User avatar
cpt_ahab
Cacti User
Posts: 61
Joined: Tue Feb 01, 2005 11:34 am

Post by cpt_ahab »

tuxer wrote:I've followed your advices and after to set up and do some php poller.php I can see the graphics but.... :( empties. it's quite strange because if I execute a php barracuda_perf.php ip upon my scripts directory I get results.


...... any suggestions....

Thanks in advance
You can also try to give your barracuda-device an IP Adress of an host who has snmp running. Dont worry you have to specifi the IP-Adress of the real barracuda with a script parameter.
I am pretty shure it has something todo with downed host detection.

Run the poller with MEDIUM debug and look in your cacti.log for the line where your script gets called. if you dont find, it isnt called and no data comes in the cacti database.

greez ubik
cacti 0.8.6j ** cactid 0.8.6d ** rrdtool 1.2.15
Debain ** Apache 2 ** PHP 4.3.0
User avatar
jparamo
Posts: 2
Joined: Thu Apr 19, 2007 4:56 am

XML Parse Err

Post by jparamo »

FWIW, I was having the XML parse error when trying to import the template. In my case it ended up being the symbol for degrees (line 512; within hash_100011dc1f73ef03772360b39ce4c492352b44)

<text_format>
User avatar
jparamo
Posts: 2
Joined: Thu Apr 19, 2007 4:56 am

XML Parse Err

Post by jparamo »

FWIW, I was having the XML parse error when trying to import the template. In my case it ended up being the symbol for degrees (line 512; within hash_100011dc1f73ef03772360b39ce4c492352b44)

changed it to
<text_format> C</text_format>

I have been able to import the template, we'll see what happens with the graphs. :)

Thanks!

Cacti Version - 0.8.6j
JamesD
Posts: 22
Joined: Fri Feb 03, 2006 12:15 pm

cannot get script to run correctly

Post by JamesD »

Thanks to jparamo for the hint about the XLM parse error. That saved me a lot of time.

I can run the scripts directly from the command line and get good results:
D:\wwwroot\cacti\scripts>php barracuda_total.php 67.155.49.143
allowed:268488 blocked:798891 quarantined:23 tagged:32429 viruses:963


However when I invoke it from the poller I get errors:

C:\cactid>cactid 30 30
CACTID: Host[30] ERROR: Empty result [67.155.49.143]: 'php d:\wwwroot\cacti\scri
pts\barracuda_perf.php 67.155.49.143'
CACTID: Host[30] DS[227] WARNING: Result from SCRIPT not valid. Partial Result:
CACTID: Host[30] ERROR: Empty result [67.155.49.143]: 'php d:\wwwroot\cacti\scri
pts\barracuda_temp.php 67.155.49.143'
CACTID: Host[30] DS[228] WARNING: Result from SCRIPT not valid. Partial Result:
CACTID: Host[30] ERROR: Empty result [67.155.49.143]: 'php d:\wwwroot\cacti\scri
pts\barracuda_total.php 67.155.49.143'
CACTID: Host[30] DS[226] WARNING: Result from SCRIPT not valid. Partial Result:
read_config_store open failure on /var/net-snmp/cactid.conf
read_config_store open failure on /var/net-snmp/cactid.conf
read_config_store open failure on /var/net-snmp/cactid.conf
[/i]

Any help would be greatly appreciated. I am running CACTI on a windows server
JamesD
Posts: 22
Joined: Fri Feb 03, 2006 12:15 pm

additional info

Post by JamesD »

I did some more troubleshooting and additional research. It turns out that if I use the built in cmd.php poller, the polling process works just fine and I get data in my graphs.

The problem is with CACTID.exe. Wish I could get it to work as CACTID.exe is much faster!
rhp
Posts: 7
Joined: Thu Jun 28, 2007 1:45 pm

Post by rhp »

Can anyone help me out with this error? It's drawing graphs but they all have nan as their values.
07/02/2007 04:36:17 PM - CACTID: Poller[0] Host[25] DS[396] SCRIPT: c:/progra~1/php/php.exe C:/Inetpub/wwwroot/cacti/scripts/barracuda_total.php 192.168.140.6, output: U
07/02/2007 04:36:17 PM - CACTID: Poller[0] Host[25] DS[396] WARNING: Result from SCRIPT not valid. Partial Result: ...
07/02/2007 04:36:17 PM - CACTID: Poller[0] Host[25] ERROR: Empty result [192.168.140.6]: 'c:/progra~1/php/php.exe C:/Inetpub/wwwroot/cacti/scripts/barracuda_total.php 192.168.140.6'
07/02/2007 04:36:16 PM - CACTID: Poller[0] Host[25] DS[395] SCRIPT: c:/progra~1/php/php.exe C:/Inetpub/wwwroot/cacti/scripts/barracuda_temp.php 192.168.140.6, output: U
07/02/2007 04:36:16 PM - CACTID: Poller[0] Host[25] DS[395] WARNING: Result from SCRIPT not valid. Partial Result: ...
07/02/2007 04:36:16 PM - CACTID: Poller[0] Host[25] ERROR: Empty result [192.168.140.6]: 'c:/progra~1/php/php.exe C:/Inetpub/wwwroot/cacti/scripts/barracuda_temp.php 192.168.140.6'
07/02/2007 04:36:16 PM - CACTID: Poller[0] Host[25] DS[394] SCRIPT: c:/progra~1/php/php.exe C:/Inetpub/wwwroot/cacti/scripts/barracuda_perf.php 192.168.140.6, output: U
07/02/2007 04:36:16 PM - CACTID: Poller[0] Host[25] DS[394] WARNING: Result from SCRIPT not valid. Partial Result: ...
07/02/2007 04:36:16 PM - CACTID: Poller[0] Host[25] ERROR: Empty result [192.168.140.6]: 'c:/progra~1/php/php.exe C:/Inetpub/wwwroot/cacti/scripts/barracuda_perf.php 192.168.140.6'
Strangely enough if I run those commands by hand, I get values back from the Barracuda. So it looks like the scripts are running fine, maybe cactid doesn't want to wait for them to finish processing before it gives up on them?
User avatar
pshankland
Cacti User
Posts: 247
Joined: Fri Dec 31, 2004 7:07 am
Location: UK

Post by pshankland »

I am getting the same problem as rhp, I get nan on all graphs but when I run 'php d:\cacti\scripts\barracuda_temp.php <ip>' I get results:

Code: Select all

temp:33
Anybody got a fix for this?

Thanks.
docelmo
Posts: 5
Joined: Fri May 12, 2006 2:50 pm

Post by docelmo »

I dont know if anyone has figured this out or not. But just to help those of you who havent... If you want to display your temp's in F degrees you need to add this line just before it echo's back the temp to cacti.

$temp_wert = ($temp_wert + 40) * (9/5) - 40;


Brian
Post Reply

Who is online

Users browsing this forum: bujangrasta and 3 guests