manual:appendix:protocols:real_time_export

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
manual:appendix:protocols:real_time_export [2018/03/13 13:26]
martins-v string -> number
manual:appendix:protocols:real_time_export [2021/03/26 11:23] (current)
martins-v fixing incorrect numeric float example (ZBX-19162)
Line 1: Line 1:
 ==== 5 Real-time export protocol ==== ==== 5 Real-time export protocol ====
  
-[[:​manual/​appendix/​install/​real_time_export|Real-time exporting]] of trigger events, item values and trends is supported ​in a newline-delimited JSON format. Exporting is done into files, where each line of the export file is a JSON object. ​+This section presents details of the [[:​manual/​appendix/​install/​real_time_export|real-time export]] protocol ​in a newline-delimited JSON format ​for: 
 + 
 +  * [[#​trigger_events|trigger events]] 
 +  * [[#​item_values|item values]] 
 +  * [[#​trends|trends]] 
 + 
 +All files have a .ndjson extension. Each line of the export file is a JSON object. ​
  
 === Trigger events === === Trigger events ===
Line 19: Line 25:
 |//​clock// ​  ​|||number ​ |Number of seconds since Epoch to the moment when problem was detected (integer part). ​ | |//​clock// ​  ​|||number ​ |Number of seconds since Epoch to the moment when problem was detected (integer part). ​ |
 |//​ns// ​     |||number ​ |Number of nanoseconds to be added to ''​clock''​ to get a precise problem detection time.  | |//​ns// ​     |||number ​ |Number of nanoseconds to be added to ''​clock''​ to get a precise problem detection time.  |
-|//​eventid//​ |||number ​ |Corresponding ​event ID, needed to correlate problem detection and resolution |+|//​eventid//​ |||number ​ |Problem ​event ID.|
 |//​value// ​  ​|||number ​ |1 (always). ​ | |//​value// ​  ​|||number ​ |1 (always). ​ |
  
Line 70: Line 76:
 |//​source//​\\ (//Log// only)     ​||string ​ |Empty string if not available. ​ | |//​source//​\\ (//Log// only)     ​||string ​ |Empty string if not available. ​ |
 |//​severity//​\\ (//Log// only)   ​||number ​ |0 if not available. ​ | |//​severity//​\\ (//Log// only)   ​||number ​ |0 if not available. ​ |
-|//logeventid//\\ (//Log// only) ||number ​ |0 if not available. ​ |+|//eventid//\\ (//Log// only) ||number ​ |0 if not available. ​ |
 |//​value// ​     ||number (for numeric items) or\\ string (for text items) ​ |Collected item value. ​ | |//​value// ​     ||number (for numeric items) or\\ string (for text items) ​ |Collected item value. ​ |
  
Line 81: Line 87:
 Numeric (float) value: Numeric (float) value:
  
-  {"​host":"​Host B","​groups":​["​Group X","​Group Y","​Group Z"​],"​applications":​["​CPU","​Performance"​],"​itemid":​4,"​name":"​CPU Load","​clock":​1519304285,"​ns":​123456789,"​value":​"0.1"}+  {"​host":"​Host B","​groups":​["​Group X","​Group Y","​Group Z"​],"​applications":​["​CPU","​Performance"​],"​itemid":​4,"​name":"​CPU Load","​clock":​1519304285,"​ns":​123456789,"​value":​0.1}
  
 Character, text value: Character, text value:
Line 89: Line 95:
 Log value: Log value:
  
-  {"​host":"​Host A","​groups":​["​Group X","​Group Y","​Group Z"​],"​applications":​["​Log files","​Critical"​],"​itemid":​1,"​name":"​Messages in log file","​clock":​1519304285,"​ns":​123456789,"​timestamp":​1519304285,"​source":"","​severity":​0,"​logeventid":​0,"​value":"​log file message"​}+  {"​host":"​Host A","​groups":​["​Group X","​Group Y","​Group Z"​],"​applications":​["​Log files","​Critical"​],"​itemid":​1,"​name":"​Messages in log file","​clock":​1519304285,"​ns":​123456789,"​timestamp":​1519304285,"​source":"","​severity":​0,"​eventid":​0,"​value":"​log file message"​}
  
 === Trends === === Trends ===