Re: SiteScope calculated metrics in Database Counter Monitor Template (335 Views)
Reply
Respected Contributor
Konstantin.Kornienko
Posts: 242
Registered: ‎12-25-2005
Message 1 of 6 (358 Views)
Accepted Solution

SiteScope calculated metrics in Database Counter Monitor Template

I created Database Counter Monitor and defined Counter using regular expression (see 1.png).

 

Everything works fine, after deploying and first run regular expression resolved to actual DB data, thresholds works and so on.

 

 

Then I defined calculated metric in template with this expression:

<<.*>>  > 10 ? 'OK' : 'CRITICAL'

 

This is also work fine after deploying.

 

Actually I need expression like this:

<<.*>>  > 5 && <<.*>> < 10 ? 'OK' : 'CRITICAL'

 

And this is not work (see 2.png).

 

Can anybody help how to fight this behavior?

Thanks, experts!

Please use plain text.
HP Expert
Gunnar_L
Posts: 303
Registered: ‎05-22-2012
Message 2 of 6 (347 Views)

Re: SiteScope calculated metrics in Database Counter Monitor Template

Hi,

 

Would you please explain to us more about what you are tryinng to perform?

 

Also in the expression that you are using did you try using /.*/ instead /*/ and && instead &?

 

Best Regards,

Gunnar López
HP Support
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
Please use plain text.
Respected Contributor
Konstantin.Kornienko
Posts: 242
Registered: ‎12-25-2005
Message 3 of 6 (343 Views)

Re: SiteScope calculated metrics in Database Counter Monitor Template

[ Edited ]

Gunnar, thank you for reply.

 

I've changed counter mask to /*/ (not a valid regular expression?)

 

and tried

 

<</*/>> > 5 & <</*/>> < 10

 

same error...

 

What I'm trying to achive: it's a pity that we can't define thresholds in SiteScope using AND logical operator.

I need critical threshold to trigger when my metric value is BETWEEN f. e., 5 and 10.

Please use plain text.
HP Expert
Gunnar_L
Posts: 303
Registered: ‎05-22-2012
Message 4 of 6 (335 Views)

Re: SiteScope calculated metrics in Database Counter Monitor Template

ahh ok, using a Regex or a threshold that is not possible, we can´t use a logical "and".

 

There is a monitor called custom database monitor where (probably) it is possible do that, would you please tell me the database you are using, which cvalue is returned from the database, the query you are using, if you can export the data of that table in a excel file and send it to me (gmlg@hp.com) I can try to perform the same in my lab, I can´t promise to give you asolution for this, but I will give it a try.

 

Best Regards,

Gunnar López
HP Support
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
Please use plain text.
HP Expert
Dmitry Shevchenko
Posts: 4,763
Registered: ‎01-30-2008
Message 5 of 6 (315 Views)

Re: SiteScope calculated metrics in Database Counter Monitor Template

[ Edited ]

I would try using brackets, i.e. ((<<.*>>  > 5) && (<<.*>> < 10)) ? 'OK' : 'CRITICAL'

Please use plain text.
Respected Contributor
Konstantin.Kornienko
Posts: 242
Registered: ‎12-25-2005
Message 6 of 6 (306 Views)

Re: SiteScope calculated metrics in Database Counter Monitor Template

[ Edited ]

Gunnar, thank you for your help!

 

Of course, I switched to Custom Database Monitor to solve this task, it works. But... it's like

   "To fire a cannon at sparrows" (russian proverb)

 

 

Dmitry, thanks for suggestion, but it's also not working

    >>>I would try using brackets, i.e. ((<<.*>>  > 5) && (<<.*>> < 10)) ? 'OK' : 'CRITICAL'

 

(see pic)

 

 

Regards,

Konstantin

Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation