资源简介
zabbix安装包...
代码片段和文件信息
/*
** Zabbix
** Copyright (C) 2001-2018 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not write to the Free Software
** Foundation Inc. 51 Franklin Street Fifth Floor Boston MA 02110-1301 USA.
**/
#include
#include
#include “zabbix_sender.h“
/*
* This is a simple Zabbix sender utility implemented with
* Zabbix sender dynamic link library to illustrate the
* library usage.
*
* See zabbix_sender.h header file for API specifications.
*
* This utility can be built in Microsoft Windows 32 bit build
* environment with the following command: nmake /f Makefile
*
* To run this utility ensure that zabbix_sender.dll is
* available (either in current directory or in windows/system
* directories or in a directory defined in PATH variable)
*/
int main(int argc char *argv[])
{
if (5 == argc)
{
char *result = NULL;
zabbix_sender_info_t info;
zabbix_sender_value_t value = {argv[2] argv[3] argv[4]};
int response;
/* send one value to the argv[1] IP address and the default trapper port 10051 */
if (-1 == zabbix_sender_send_values(argv[1] 10051 NULL &value 1 &result))
{
printf(“sending failed: %s\n“ result);
}
else
{
printf(“sending succeeded:\n“);
/* parse the server response */
if (0 == zabbix_sender_parse_result(result &response &info))
{
printf(“ response: %s\n“ 0 == response ? “success“ : “failed“);
printf(“ info from server: \“processed: %d; failed: %d; total: %d; seconds spent: %lf\“\n“
info.total - info.failed info.failed info.total info.time_spent);
}
else
printf(“ failed to parse server response\n“);
}
/* free the server response */
zabbix_sender_free_result(result);
}
else
{
printf(“Simple zabbix_sender implementation with zabbix_sender library\n\n“);
printf(“usage: %s \n\n“ argv[0]);
printf(“Options:\n“);
printf(“ Hostname or IP address of Zabbix server\n“);
printf(“ Host name\n“);
printf(“ Item key\n“);
printf(“ Item value\n“);
}
return EXIT_SUCCESS;
}
相关资源
- zabbix监控系统深度实践完整版-包含二
- zabbix3.4官方中文文档
- CentOS7下部署Zabbix所需要的全部rpm安装
- zabbix 3.4中文手册
- zabbix-3.0.4.tar.gz
- zabbix-3.4.4源码包
- zabbix4.0+centos_1804支持离线rpm安装包
- ZabbixServer 3.4 CentOS7自动安装脚本
- Zabbix短信报警脚本
- zabbix installation.rar
- centos7 zabbix 一键安装脚本
- 适用于华为CE系列及S系列交换机的z
- 华为CE/S系列交换机zabbix监控模版
- checkpoint防火墙模板for zabbix
- linux主动监控模板
- zabbix windows主动监控模板
- Zabbix CIICSO3750 监控模板
- zabbix IIS监控模板
- 微服务监控模板
- zabbix 监控全国各节点网络延迟
- zabbix_agent3.4.15.Solaris11.3.X86_64.tar.gz
- zabbix_agent 3.4.15 for Solaris 11.3 SPARC.rar
- windows\\centos\\suse\\rhel的ZABBIX_agent安装
- 华为s2700 zabbix template
- S5720-32C-HI-24Szabbix监控交换机cpu、风扇
- zabbix windows 2008 r2模板
- zabbix 常用模版
- zabbix-agent监控windows
- zabbix_交换机模板
- zabbix监控docker模板
评论
共有 条评论