Compute Service
jeff weisberg
jaw+arguslist at tcp4me.com
Wed Feb 1 12:54:31 EST 2012
On 1 Feb 2012, at 10:24, Jeremy Kister wrote:
> must expr have a %{ Top:object } to math ?
yes.
'compute' was intended to be used for computing something
based on the results of other monitored services.
> Or, there a reason that something like:
>
> Service Compute {
> debug: yes
> expr: 500 + 1
> }
>
> will make the compute service continuously fail with:
> Service start
> start compute
> service not ready: Top:Foo:Cluster1:SSG:licenses
> Service done
I see no way these messages could come from that config.
they came from something with a '%
{Top:Foo:Cluster1:SSG:licenses}' (and something else) in the expr.
> I realize the compute of a static expr may seem odd, but it is very
> convenient to get a variable into Argus as an object.
yes, that seems odd.
you want argus to calculate 1 + 2? why? so argus can page you if Q
changes the laws of mathematics?
> > cat 123_test
> #!/usr/local/bin/perl
>
> my %data = (one => 1,
> two => 2,
> );
>
> cat <<__EOA__
> Group "Test123" {
> Service Compute {
> expr: $data{one} + $data{two}
> uname: foo
> }
> }
your example is generating an argus config using perl.
perl can add numbers together itself:
my $x = 500 + 1;
print "$x\n";
More information about the Arguslist
mailing list