Table of Contents


Available since version: 1.8
This function allows you to retrieve alert details based on filtering options. All parameters are optional. If parameter is set in query this option counted as ON, except if parameter is equal to NULL.


nodeidsarrayNode IDs
groupidsarrayHostGroup IDs
hostidsarrayHost IDs
alertidsarrayAlert IDs
triggeridsarrayTrigger IDs
eventidsarrayEvent IDs
editableintegeronly with read-write permission. Ignored for SuperAdmins
time_fromintegerSearch alerts from given date Unix timestamp
time_tillintegerSearch alerts till given date Unix timestamp
filterarrayOptional filter by alert fields
searcharrayReturn alerts by any given alert object field pattern
startSearchintegerSearch alerts field pattern only in start of the field
excludeSearchintegerExclude from result, alerts by given field pattern
searchWildcardsEnabledintegerSearch pattern in whole field using wildcards 1 - enable, 0 - disable
outputstringOutput options Values: shorten, refer, extend
select_hostsstringSelect hosts Values: shorten, refer, extend
select_mediatypesstringSelect mediatypes Values: shorten, refer, extend
select_usersstringSelect users Values: shorten, refer, extend
countOutputintegerCount alerts, return number of alerts found
groupCountintegerReturn the number of results grouped by given IDs
preservekeysintegerReturn hash instead of array Keys of hash are object IDs
sortfieldstringSort by alert field Values: alertid,clock,eventid,status
sortorderstringSort order Values: ASC, DESC
limitintmax number of alert objects to return


resultOperation successful. Result will contain array of Alert objects.
errorIn case of any errors


Get alerts details by trigger IDs and limit output to 10 alerts, return only alert IDS:

	"triggerids": ["100100000010137", "100100000010138"],
	"time_from": 1285077093,
	"time_till": 1285107165,
	"limit": 10

Retrieved alerts details: