我自己搭建了一个简单的http服务器完成了内网穿透 不知道这样可不可以完成题目要求
还有想请教各位关于snmp协议如何采集和分析 研究了一下午没有一点头绪
所以完成这个要求所需要的内容是什么样的
如果各位有方案和更好的思路欢迎留言 必有zhong谢
第一步,要了解什么是snmp,它是怎么工作的
https://blog.csdn.net/qq_41804366/article/details/104541781
第二步,你要在linux系统里安装snmp
https://blog.csdn.net/qq_42525457/article/details/111386779
https://jingyan.baidu.com/article/e9fb46e15204547520f76678.html
第三步,使用Python进行snmp操作
https://blog.csdn.net/sinat_38682860/article/details/108962382
还有视频教程
https://www.bilibili.com/video/av204785460/
第四步,功能做出来后,做个可视化界面
https://blog.csdn.net/weixin_39633500/article/details/113656796
https://www.bilibili.com/video/BV1EZ4y1K7FZ/?spm_id_from=333.788.recommend_more_video.5
我给你提供些思考方向吧!
1、参考elk模型,logstash采集snmp数据
2、查找linux或者相关服务的OID,用于收集数据
3、图形化可以参考elk里面kibana
相关学习链接
https://blog.csdn.net/u013673367/article/details/30861119
https://blog.csdn.net/a648642694/article/details/115615189
编程语言是c#
1.在VS的Nuget里下载 SnmpSharpNet 包
2.方法如下
public static string getSnmpValByOid(string host, int snmpPort, string community, string oid)
{
string val = "";
OctetString second = new OctetString(community);
AgentParameters param = new AgentParameters(second);
param.Version = SnmpVersion.Ver2;
IpAddress agent = new IpAddress(host);
UdpTarget target = new UdpTarget((IPAddress)agent, snmpPort, 2000, 1);
Pdu pdu = new Pdu(PduType.Get);
pdu.VbList.Add(oid);
SnmpV2Packet result = (SnmpV2Packet)target.Request(pdu, param);
if (result != null)
{
if (result.Pdu.ErrorStatus == 0)
{
val = result.Pdu.VbList[0].Value.ToString();
}
}
target.Close();
return val;
}
3.调用如下:
string result = getSnmpValByOid("192.168.1.12",161,"public", "1.3.6.1.4.1.34651.2.2.1.10.1");
Console.WriteLine(result);