From shiemstra at h2.com Thu Mar 1 09:19:34 2012 From: shiemstra at h2.com (Scott Hiemstra) Date: Thu, 1 Mar 2012 09:19:34 -0500 Subject: Rounding a computed value Message-ID: <073C6B4DF1DDC8498449BE3F9575666D03579CF25DD7@horus.h2.com> Hello all, We're pulling the inlet temperature from our 7206 via SNMP and converting it to farenheit. No issues doing that but I'd like to round the value since the precision isn't really there anyway. Is it possible to round the computed value so I'm not seeing values like 78.8? Service UDP/SNMP { community: ********** hidden: yes hostname: my_7206.router.ip oid: .1.3.6.1.4.1.9.9.13.1.3.1.3.1 sendnotify: no uname: 7206_Celcius } Service Compute { expr: ((%{Top:Environmentals:Server_Room:7206_Celcius} * 9) / 5) + 32 graph: yes label: 7206 Temperature maxvalue: 83 messagedn: server room is too hot messageup: server room has cooled back down uname: 7206 Temperature ylabel: Degrees Farenheit } Thanks in advance, Scott From argus-02 at jeremykister.com Thu Mar 1 16:13:11 2012 From: argus-02 at jeremykister.com (Jeremy Kister) Date: Thu, 01 Mar 2012 16:13:11 -0500 Subject: Rounding a computed value In-Reply-To: <073C6B4DF1DDC8498449BE3F9575666D03579CF25DD7@horus.h2.com> References: <073C6B4DF1DDC8498449BE3F9575666D03579CF25DD7@horus.h2.com> Message-ID: <4F4FE667.4080101@jeremykister.com> On 3/1/2012 9:19 AM, Scott Hiemstra wrote: > expr: ((%{Top:Environmentals:Server_Room:7206_Celcius} * 9) / 5) + 32 not sure if this'll work, but i bet it will: expr: int( ((%{Top:Environmentals:Server_Room:7206_Celcius} * 9) / 5) + 32 + 0.5 ) -- Jeremy Kister http://jeremy.kister.net./ From shiemstra at h2.com Thu Mar 1 16:53:57 2012 From: shiemstra at h2.com (Scott Hiemstra) Date: Thu, 1 Mar 2012 16:53:57 -0500 Subject: Rounding a computed value In-Reply-To: <4F4FE667.4080101@jeremykister.com> References: <073C6B4DF1DDC8498449BE3F9575666D03579CF25DD7@horus.h2.com> <4F4FE667.4080101@jeremykister.com> Message-ID: <073C6B4DF1DDC8498449BE3F9575666D03579CF25DE2@horus.h2.com> Works like a champ, thanks man. Scott -----Original Message----- From: arguslist-bounces at tcp4me.com [mailto:arguslist-bounces at tcp4me.com] On Behalf Of Jeremy Kister Sent: Thursday, March 01, 2012 4:13 PM To: Discussion about Argus Subject: Re: Rounding a computed value On 3/1/2012 9:19 AM, Scott Hiemstra wrote: > expr: ((%{Top:Environmentals:Server_Room:7206_Celcius} * 9) / 5) + 32 not sure if this'll work, but i bet it will: expr: int( ((%{Top:Environmentals:Server_Room:7206_Celcius} * 9) / 5) + 32 + 0.5 ) -- Jeremy Kister http://jeremy.kister.net./ _______________________________________________ http://argus.tcp4me.com/ Arguslist at tcp4me.com http://www.tcp4me.com/mailman/listinfo/arguslist From settecplus at yahoo.com Tue Mar 6 06:29:50 2012 From: settecplus at yahoo.com (cippa lippa) Date: Tue, 6 Mar 2012 03:29:50 -0800 (PST) Subject: Hep installing Argus on Lighttpd Message-ID: <1331033390.21495.YahooMailNeo@web121801.mail.ne1.yahoo.com> Hi, I've been trying for a few of days to install Argus on a debian box with Lighttpd with modest resutls... I'm using the latest version of argus, and I have enabled mod_cgi in lighttpd.conf. Argus is running fine (I receive email alerts in case of snmp errors) but I can't access the Web interface... I must note I'm running argus as root at the moment.? Now, it's obvious I'm having some file permissions problem, but I don't know how to fix it. I'm not saying I don't know ho to change file permissions under linux, but that I don't know how to set 'em up for Argus... Here are the folders as setup in Makefile, and some file/folder permissions: #### This section automagically generated by Configure PERL=/usr/bin/perl SENDMAIL=/usr/sbin/sendmail QPAGE= FPING=/usr/bin/fping FPING6=/usr/bin/fping6 DATABASE=DB_File HAVE_GD=0 AUTH_FILE=web_auth_file.pl UPGRADING= INSTALL_BIN=/usr/bin INSTALL_SBIN=/usr/sbin INSTALL_CGI=/usr/lib/cgi-bin INSTALL_LIB=/usr/lib/argus INSTALL_DATA=/var/argus INSTALL_WWW=/var/www Here some file/dir permissions: -rwxr-xr-x 1 root root 1597 mar? 6 11:26 /usr/bin/argus-config -rwxr-xr-x 1 root root 7057 mar? 6 11:26 /usr/sbin/argus-agent -rwxr-xr-x 1 root root 1569 mar? 6 11:26 /usr/sbin/argusctl -rwxr-xr-x 1 root root 6029 mar? 6 11:26 /usr/sbin/argusd luc at debian:~/argus/argus-dev-20120107$ ll /usr/lib/cgi-bin/ totale 28 -rwxr-xr-x 1 www-data www-data? 9560 mar? 6 11:26 arguscgi -rwxr-xr-x 1 www-data www-data 14700 mar? 6 11:26 argusvxml luc at debian:~/argus/argus-dev-20120107$ ll /var/www/ totale 96 -rw-r--r-- 1 root???? root????? 8387 mar? 6 11:26 argus.css -rw-r--r-- 1 root???? root????? 1337 mar? 6 11:26 argus.js -rw-r--r-- 1 root???? root????? 2627 mar? 6 11:26 argus.logo.gif -rw-r--r-- 1 www-data www-data? 3585 mar? 1 16:33 index.lighttpd.html -rw-r--r-- 1 root???? root??????? 84 mar? 6 11:26 nospkr.gif -rw-r--r-- 1 root???? root??????? 97 mar? 6 11:26 sad.gif -rw-r--r-- 1 root???? root??????? 97 mar? 6 11:26 sadred.gif -rw-r--r-- 1 root???? root??????? 97 mar? 6 11:26 smile.gif -rw-r--r-- 1 root???? root???? 54080 mar? 6 11:26 whoopwhoop.wav luc at debian:~/argus/argus-dev-20120107$ ll /var/argus/ totale 48 -rwxrwxrw-? 1 www-data www-data 1272 mar? 6 12:26 config -rwxrwxrw-? 1 www-data www-data 2979 mar? 6 11:26 config.example srwxrwxrwx? 1 root???? root??????? 0 mar? 6 11:54 control drwxrwxrw-? 2 www-data www-data 4096 mar? 6 11:26 gcache drwxrwxrw- 28 www-data www-data 4096 mar? 6 11:54 gdata drwxrwxrw- 28 www-data www-data 4096 mar? 6 11:54 html drwxrwxrw-? 2 www-data www-data 4096 mar? 6 11:26 locale -rwxrwxrw-? 1 www-data www-data?? 70 mar? 6 11:54 log drwxrwxrw-? 2 www-data www-data 4096 mar? 6 11:59 notify -rwxrwxrw-? 1 www-data www-data??? 6 mar? 6 11:59 notno drwxrwxrw-? 2 www-data www-data 4096 mar? 6 11:26 perl drwxrwxrw- 28 www-data www-data 4096 mar? 6 11:54 stats -rwxrwxrw-? 1 www-data www-data? 163 mar? 6 11:42 users Thank you for any hints! From settecplus at yahoo.com Tue Mar 6 08:29:40 2012 From: settecplus at yahoo.com (cippa lippa) Date: Tue, 6 Mar 2012 05:29:40 -0800 (PST) Subject: Hep installing Argus on Lighttpd In-Reply-To: <1331033390.21495.YahooMailNeo@web121801.mail.ne1.yahoo.com> References: <1331033390.21495.YahooMailNeo@web121801.mail.ne1.yahoo.com> Message-ID: <1331040580.92267.YahooMailNeo@web121801.mail.ne1.yahoo.com> Ok, I made a small step forward. There is a little problem in Debian with lighttpd and cgi-bin (see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=345554). The solution was simply adding the two following lines to lighttpd.conf and enabling mod_alias and mod_cgi (they already were by defaults): $HTTP["url"] =~ "/cgi-bin/" { cgi.assign = ( "" => "" ) } alias.url = ( "/cgi-bin/" => "/usr/lib/cgi-bin/" ) Now, I can access http://myhost/cgi-bin/arguscgi But I get back a "Unable to access Top 200 OK" error, which? I really think is related to wrong permissions... Luc ----- Messaggio originale ----- Da: cippa lippa A: "arguslist at tcp4me.com" Cc: Inviato: Marted? 6 Marzo 2012 12:29 Oggetto: Hep installing Argus on Lighttpd Hi, I've been trying for a few of days to install Argus on a debian box with Lighttpd with modest resutls...