snmp

cacti系列(一)之cacti的安装及配置监控mysql服务

给你一囗甜甜゛ 提交于 2019-12-28 05:40:48
简介 Cacti是通过 snmpget来获取数据,使用 RRDtool绘画图形,而且你完全可以不需要了解RRDtool复杂的参数。它提供了非常强大的数据和用户管理功能,可以指定每一个用户能查看树状结构、host以及任何一张图,还可以与LDAP结合进行用户验证,同时也能自己增加模板,功能非常强大完善。界面友好。 CACTI 软件 Cacti 的发展是基于让 RRDTool 使用者更方便使用该软件,除了基本的 Snmp 流量跟系统资讯监控外,Cacti 也可外挂 Scripts 及加上 Templates 来作出各式各样的监控图。 cacti是用php语言实现的一个软件,它的主要功能是用snmp服务获取数据,然后用rrdtool储存和更新数据,当用户需要查看数据的时候用rrdtool生成图表呈现给用户。因此,snmp和rrdtool是cacti的关键。Snmp关系着数据的收集,rrdtool关系着数据存储和图表的生成。 Mysql配合PHP程序存储一些变量数据并对变量数据进行调用,如:主机名、主机ip、snmp团体名、端口号、模板信息等变量。 snmp抓到数据不是存储在mysql中,而是存在rrdtool生成的rrd文件中(在cacti根目录的rra文件夹下)。rrdtool对数据的更新和存储就是对rrd文件的处理,rrd文件是大小固定的档案文件(Round Robin Archive

Centos下安装Cacti图解教程

雨燕双飞 提交于 2019-12-27 20:25:40
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> Cacti 在英文中的意思是仙人掌的意思,Cacti是一套基于PHP,MySQL,SNMP及RRDTool开发的网络流量监测图形分析工具。它通过 snmpget来获取数据,使用 RRDtool绘画图形,而且你完全可以不需要了解RRDtool复杂的参数。它提供了非常强大的数据和用户管理功能,可以指定每一个用户能查看树状结 构、host以及任何一张图,还可以与LDAP结合进行用户验证,同时也能自己增加模板,功能非常强大完善。 下图是cacti运行的主界面 Cacti 架构图: 环境:LNMP(安装参考官网: www.lnmp.org ) Cacit 运行环境需要PHP + Mysql + rrdtool 以及snmp 工具的支持。 一、准备工作 环境:LNMP( www.lnmp.org ) 所需软件: rrdtool Net-snmp Net-snmp-libs Net-snmp-utils 下载相关软件(先做第二步骤的(2)步骤,下面的添加源安装yum直接用yum安装以上软件包) 二、安装配置 (1)、在主监控机上安装net-snmp net-snmp-libs net-snmp-utils net-snmp-devel yum -y install net-snmp net-snmp-libs net

docker安装snmp rrdtool环境

家住魔仙堡 提交于 2019-12-27 19:22:57
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 以Ubuntu16:04作为基础版本 docker pull ubuntu:16.04 启动一个容器 docker run -d -i -t --name flow_mete ubuntu:16.04 bash 进入容器 docker exec -it flow_mete bash cd ~ 安装基本软件 apt-get update && apt-get upgrade -y && apt-get install -y curl wget vim build-essential ca-certificates gcc git libpq-dev make python-pip python2.7 python2.7-dev ssh libmysqlclient-dev && apt-get autoremove && apt-get clean 安装最新pip python -m pip uninstall pip setuptools wget https://bootstrap.pypa.io/get-pip.py python get-pip.py ln -s /usr/local/bin/pip /usr/bin/pip && pip list 安装net-snmp wget https:/

net-snmp简介与命令工具集

纵饮孤独 提交于 2019-12-27 02:22:48
简介 net-snmp是支持SNMP的一套应用程序集和开发库,包含了代理端软件和管理端查询工具。 开发状态:成熟 操作系统:Linux、Solaris、HP-UX、Windows、FreeBSD、NetBSD、QNX... 开发语言:C、Perl 应用主题:网络监控 用户接口:X Window System(X11)、命令工具行、后台进程 重要组件: ①基于命令行CLI(Command Line Interface,命令行接口)的一套协议操作工具、配置文件工具、信息收集工具等。通过它们完成一些关于SNMP的管理工作; ②基于Tk/perl的图形化MIB浏览工具 ; ③可扩展的后台进程(代理)snmpd,用于响应请求事件。除了支持大量的内嵌MIB外,还可以通过动态加载模块、外部脚本和命令等进行扩展; ④接收SNMP通告消息的后台进程snmptrapd。能将接收到的通告消息以syslog日志展现,并存储为普通的纯文本格式。 ⑤C和Perl的API库,可以依赖它们编写自己的SNMP应用程序。 ⑥大量的标准MIB等。 命令工具集 net-snmp提供了一整套的工具集(应用程序),用于开发调试、管理和协议实现,主要有下面几种: 守护进程: snmpd net-snmp 开发的主代理程序,包括众多标准 MIB 的实现,还可以使用子代理进行扩展,是一个功能强大的SNMP代理。运行snmpd后

浪潮获取cpu、内存、硬盘等信息(redfish协议+restfull协议)

偶尔善良 提交于 2019-12-25 17:33:40
import requests import json requests.packages.urllib3.disable_warnings() ###原理:cpu、内存、存储分别使用不同的url获取到值,如url不一致只分别修改对应的第一个url即可,后面的详细参数的URL函数自动提取 class GetHostInfo(object): def __init__(self,ipaddr,username,password): self.ip=ipaddr.strip() self.URLprefix='https://'+ipaddr.strip() self.username=username.strip() self.password=password.strip() global token ##同时存在4-5个token链接,每个token链接时间为5分钟,可以自己设置。该token是在响应头获取到的,直接用到redfish认证的header中。 global CSRFToken ##该token是在响应的文本或json格式中获取到的,需要经过处理、加工后用到restfull认证的header中。 global cookie ##该cookie是在响应头获取到的,需要经过处理、加工后用到restfull认证的header中。 CSRFToken=0 cookie=0

SnmpV3AdaptorServer snmpV1Trap throws IOException and not releasing its resource

扶醉桌前 提交于 2019-12-25 10:01:12
问题 I am using SNMPAdaptorServer for sending trap. snmpAdaptor.snmpV1Trap(...) For some reason it throwing IOException: java.io.IOException: Invalid argument at java.net.PlainDatagramSocketImpl.send(Native Method) at java.net.DatagramSocket.send(DatagramSocket.java:625) at com.sun.management.comm.SnmpAdaptorServer.sendTrapMessage(SnmpAdaptorServer.java:2266) at com.sun.management.comm.SnmpAdaptorServer.sendTrapPdu(SnmpAdaptorServer.java:2237) at com.sun.management.comm.SnmpAdaptorServer

SnmpV3AdaptorServer snmpV1Trap throws IOException and not releasing its resource

大憨熊 提交于 2019-12-25 10:00:28
问题 I am using SNMPAdaptorServer for sending trap. snmpAdaptor.snmpV1Trap(...) For some reason it throwing IOException: java.io.IOException: Invalid argument at java.net.PlainDatagramSocketImpl.send(Native Method) at java.net.DatagramSocket.send(DatagramSocket.java:625) at com.sun.management.comm.SnmpAdaptorServer.sendTrapMessage(SnmpAdaptorServer.java:2266) at com.sun.management.comm.SnmpAdaptorServer.sendTrapPdu(SnmpAdaptorServer.java:2237) at com.sun.management.comm.SnmpAdaptorServer

Reuse getCmd object in pysnmp

微笑、不失礼 提交于 2019-12-25 08:46:13
问题 In the pysnmp documentation there is a getCmd class, I was wondering if it was possible to just instantiate the class once and reuse it at a later point by passing it new oids. I am not sure if the getCmd class exposes methods to allow me to change the oids. http://pysnmp.sourceforge.net/docs/hlapi/asyncore/sync/manager/cmdgen/getcmd.html 回答1: The getCmd name is referring to a function, not a class. Technically, it is a generator, but that is not important here. It is cheap to call *Cmd()

How do you use asymmetric keys or certificate authentication in SNMP4J?

蹲街弑〆低调 提交于 2019-12-25 08:37:15
问题 I am working on a project that would like to be able to use certificates or keys as a method of authentication for SNMPv3. We are using the java library SNMP4J. During my research I have found that SNMP uses TLS/DTLS for message encryption and supposedly also for authentication. Source 1 | Source 2 | Source 3 Looking into the little documentation SNMP4J has, I found that it allows the usage of TLS certificates for encrypting traffic. But I am not sure how the authentication is done, if

Network discovery using broadcast snmp requests

半城伤御伤魂 提交于 2019-12-25 07:04:42
问题 I want to discover the printers in my sub-net. Can I do that using net-snmp as mentioned in this following link- https://sourceforge.net/p/net-snmp/bugs/2336/ But it doesn't seem to work? Should I enable any flag for broadcast in snmp_api to do that. Also how will I go about handling the responses? Could you explain me in context of this simple application- http://www.net-snmp.org/wiki/index.php/TUT:Simple_Application I'm new to SNMP. Any help is much appreciated. PS: I use net-snmp 5.7.2.1