15 Zabbix sender dynamic link library for Windows

In a Windows environment applications can send data to Zabbix server/proxy directly by using the Zabbix sender dynamic link library (zabbix_sender.dll) instead of having to launch an external process (zabbix_sender.exe).

The dynamic link library with the development files is located in bin\winXX\dev folders. To use it, include the zabbix_sender.h header file and link with the zabbix_sender.lib library. An example file with Zabbix sender API usage can be found in build\win32\examples\zabbix_sender folder.

The following functionality is provided by the Zabbix sender dynamic link library:

int zabbix_sender_send_values(const char address, unsigned short port,const char source, const zabbix_sender_value_t values, int count,char *result);
char result);`{.c}

The following data structures are used by the Zabbix sender dynamic link library:

  1. typedef struct
  2. {
  3. /* host name, must match the name of target host in Zabbix */
  4. char *host;
  5. /* the item key */
  6. char *key;
  7. /* the item value */
  8. char *value;
  9. }
  10. zabbix_sender_value_t;
  11. typedef struct
  12. {
  13. /* number of total values processed */
  14. int total;
  15. /* number of failed values */
  16. int failed;
  17. /* time in seconds the server spent processing the sent values */
  18. double time_spent;
  19. }
  20. zabbix_sender_info_t;