zabbix_sende是zabbix_agent向zabbix_server发送数据的命令行工具,在zabbix_server端要有zabbix trapper类型的Item监控项。
只接受指定的agent host发送来的数据。
在zabbix_sender中定义了向server端发送信息的结构体 ZBX_THREAD_SENDVAL_ARGS:
typedef struct
{
char *source_ip;
char *server;
usingned short port;
struct zbx_json json;
}
ZBX_THREAD_SENDVAL_ARGS
函数:
static int update_exit_status(int old_status, int new_status){
刷新退出时的状态;
}
static const char *getstring(const char*p , char* buf , size_t bufsize)
{
以‘ ’或‘\t’作为分割参数,分割参数字符串 p, 返回指向剩余字符串的指针
}
static check_response(char * response)
{
检查json数据返回状态&