Howto avoid an error ( to many values ) from a dpQuery(\'SELECT ALERT ......TIMESPAN(...)\')

Find and share HowTos to various installations / configurations!
3 posts • Page 1 of 1
michel.eijgermans
Posts:46
Joined: Mon Aug 08, 2011 11:50 am

Howto avoid an error ( to many values ) from a dpQuery(\'SELECT ALERT ......TIMESPAN(...)\')

Post by michel.eijgermans »

I want to create an Historic alertview over a large TIMESPAN to search for a specific Alerts in the past. My alert-system is busy with sometimes more then 4000 alerts a day. What i see is that when using a dpQuery() on ALERTS the query returns an error if the TIMESPAN exceeds approximatly xx day's.

What i would like to do is Filter-out Alerts in which i'm not interested in. For example via 'Priority' Filter so i can use a bigger TIMESPAN to see alerts which occurs only a few times a month.
Currently i can't get it working. It seems to be that i cannot Exceed a certain TIMESPAN.

The TIMESPAN seems to be limited to the amount of alerts that my dpQuery-TIMESPAN spannes.

Is there a way to search my alert-history for the last year and collects approx. the 100 records that i'm interested in?

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Howto avoid an error ( to many values ) from a dpQuery(\'SELECT ALERT ......TIMESPAN(...)\')

Post by leoknipp »

When using a dpQuery command to get historical value/alerts you have to take into account that querying data is multi-level process.
Limiting the data is first made using the FROM-statement (DPE filter/DP group filter). After reading data using this filter additional filter settings (WHERE clause) are applied.
If there is no DPE filter defined in your case the query limit is exceeded before the WHERE clause is used. Therefore you always will get the information that the limit is exceeded also if different WHERE filters are used.

To read data for a long timerange please use DPE filter which fits your requirements to limit data in the first level of the query.

If the same set of DPE elements shall be used several times you can create a DP group which contains the DPE elementes which are of interest.

Best Regards
Leopold Knipp
Senior Support Specialist

Gertjan van Schijndel
Posts:634
Joined: Mon Aug 02, 2010 10:37 am

Re: Howto avoid an error ( to many values ) from a dpQuery(\'SELECT ALERT ......TIMESPAN(...)\')

Post by Gertjan van Schijndel »

To avoid the 'Too many values' error with a large TIMERANGE query you could use 'dpQuerySplit()'.

3 posts • Page 1 of 1