13 Zabbix sender dynamic link library for Windows

Zabbix sender 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).

在 Windows环境中,应用程序可以直接通过Zabbix sender 动态链接库向Zabbix server/proxy发送数据,而不用使用外部程序 (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. 动态链接库和开发源文件的位置是bin\winXX\dev文件夹。要使用的话,需要加入zabbix_sender.h页眉文件并且链接zabbix_sender.lib库。使用Zabbix sender API的示例文件请查看:build\win32\examples\zabbix_sender 文件夹。 The following functionality is provided by the Zabbix sender dynamic link library: 以下列出了一些Zabbix sender动态链接库可以提供的的功能点

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:

typedef struct
       {
           /* host name, must match the name of target host in Zabbix */
           char    *host;
           /* the item key */
           char    *key;
           /* the item value */
           char    *value;
       }
       zabbix_sender_value_t;
       
       typedef struct
       {
           /* number of total values processed */
           int total;
           /* number of failed values */
           int failed;
           /* time in seconds the server spent processing the sent values */
           double  time_spent;
       }
       zabbix_sender_info_t;