-
Incident report
-
Resolution: Fixed
-
Major
-
1.8
-
None
-
FreeBSD Version 8.0
I have a host group of 1500 hosts and am trying to create an aggregated item across all the hosts in the group.
I receive the following error in the logs:
63234:20091218:225923.687 [Z3005] Query failed: [0] PGRES_FATAL_ERROR:ERROR: syntax error at end of input
LINE 1: ...26731,24811,29651,22301,37251,36911,22661,25291,36161,30251,
^
[select itemid,value_type,lastvalue from items where lastvalue is not NULL and items.itemid in (0,26231,33681,33931,33171,35271,22981,29091,25961,22451,36761,36301,26561,34101,28111,32101,33741,28001,29791,34911,30631,31851,26011,35141,33421,25431,30511,32011,35891,30231,33091,30351,32851,32421,35581,36141,26621,24511,23451,34241,34271,32191,30831,36021,36261,28021,27471,24281,27511,36751,31311,29241,27731,30131,37241,31211,34221,29191,36001,36491,30141,34991,32161,37221,34521,30181,32511,24821,31701,35801,24351,30451,25191,32301,33181,31411,28951,28511,29251,31331,27711,33671,22881,31891,30621,33411,31141,27171,31691,24441,29181,25771,34231,26861,27201,34531,28421,28131,34011,36351,22501,32481,23191,31401,35571,26911,35001,30061,23441,36211,37231,25741,30561,33461,35421,35171,33201,36061,36961,29451,25871,30301,22391,30241,23471,30361,32691,32171,28751,33361,33811,35071,33601,22731,29471,32931,32951,31391,36051,37111,36661,23361,25041,29001,32681,28281,25121,22971,24761,31871,30321,29261,33591,34631,25601,25271,28391,34731,36281,36621,37121,23691,28611,28351,32021,34511,25611,33611,35961,36941,24411,36181,35781,33431,34361,29131,22351,35111,35481,29591,32971,24881,30911,37281,25011,32801,30991,22651,28991,28871,32291,30341,23611,35531,28651,26811,29481,33041,23851,35551,22531,29711,24451,23051,30201,25651,34851,25731,26371,23771,23561,24491,23601,24081,23731,24611,23971,25691,36311,31941,27811,29411,27931,26841,26361,24571,24931,25051,26851,36191,28891,36421,28571,30611,28051,29371,33921,30851,24371,36411,25641,30071,34161,35151,28091,35921,32611,22481,36871,31341,31521,34151,37161,34331,34451,34171,34691,35651,26301,23791,37211,30651,34771,37331,36381,24501,31631,35491,36991,23961,26921,35601,32411,36331,35901,27971,34051,29121,24911,30491,35831,36071,23701,36731,35741,31741,30481,27551,32401,31511,32121,35791,26131,24681,23941,23091,23381,24061,30941,26451,29571,32181,32141,24661,27251,33901,34021,34961,26471,33941,37151,34821,32771,36521,26891,31231,26731,24811,29651,22301,37251,36911,22661,25291,36161,30251,]
63234:20091218:225923.687 No values for group[Operational Schools] key[icmpping])
63234:20091218:225923.687 Parameter [fw.school1:grpsum["Operational Schools","icmpping","last","0"]] is not supported by agent Old status [0]
As you may notice they SQL is truncated, some glancing at the code seems to suggest that MAX_STRING_LEN has been reached in this instance.
If i get some time over the next couple of days i will study the effects of keeping the initial selection of itemid's as a sub-select affects the performance. It would obviate the need for string based sql construction and should really cost less then the current solution.
Kind regards,
Andre Sachs