Subject: Rounding a computed value

From: Scott Hiemstra <[email-masked]>
Date: Thu, 1 Mar 2012 09:19:34 -0500

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: Jeremy Kister <[email-masked]>
Date: Thu, 01 Mar 2012 16:13:11 -0500

> 	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: Scott Hiemstra <[email-masked]>
Date: Thu, 1 Mar 2012 16:53:57 -0500

Works like a champ, thanks man.

Scott

-----Original Message-----
From: [email-masked] [mailto:[email-masked]] On Behalf Of Jeremy Kister
Sent: Thursday, March 01, 2012 4:13 PM
To: Discussion about Argus
Subject: Re: Rounding a computed value

-- 

Jeremy Kister

_______________________________________________
http://argus.tcp4me.com/
[email-masked]
http://www.tcp4me.com/mailman/listinfo/arguslist