专业IT网络知识平台,分享IT百科知识、生活百科知识解答!

易企推科技
易企推科技

snmptrap命令详解,snmptrap介绍及使用

来源:小易整编  作者:小易  发布时间:2023-03-28 11:30
摘要:snmptrap命令详解,snmptrap介绍及使用如果你是对SNMP完全不了解,或者只想学习如何使用现成的SNMP工具,那你找对了文章,但如果你希望学习SNMP具体协议内容,推荐阅读官方的RFC文档。1.简介SNMP(SimpleNetw...
                                          #     settings, change the community string,                                                 #     and check the 'agentAddress' setting above#rocommunity secret  10.0.0.0/16                                                 #  Full read-only access for SNMPv3 rouser   authOnlyUser                                                 #  Full write access for encrypted requests                                                 #     Remember to activate the 'createUser' lines above#rwuser   authPrivUser   priv#  It's no longer typically necessary to use the full 'com2sec/group/access' configuration#  r[ow]user and r[ow]community, together with suitable views, should cover most requirements#################################################################################  SYSTEM INFORMATION##  Note that setting these values here, results in the corresponding MIB objects being 'read-only'#  See snmpd.conf(5) for more detailssysLocation    Sitting on the Dock of the BaysysContact     Me <me@example.org>                                                 # Application + End-to-End layerssysServices    72##  Process Monitoring#                               # At least one  'mountd' processproc  mountd                               # No more than 4 'ntalkd' processes - 0 is OKproc  ntalkd    4                               # At least one 'sendmail' process, but no more than 10proc  sendmail 10 1#  Walk the UCD-SNMP-MIB::prTable to see the resulting output#  Note that this table will be empty if there are no "proc" entries in the snmpd.conf file##  Disk Monitoring#                               # 10MBs required on root disk, 5% free on /var, 10% free on all other disksdisk       /     10000disk       /var  5%includeAllDisks  10%#  Walk the UCD-SNMP-MIB::dskTable to see the resulting output#  Note that this table will be empty if there are no "disk" entries in the snmpd.conf file##  System Load#                               # Unacceptable 1-, 5-, and 15-minute load averagesload   12 10 5#  Walk the UCD-SNMP-MIB::laTable to see the resulting output#  Note that this table *will* be populated, even without a "load" entry in the snmpd.conf file#################################################################################  ACTIVE MONITORING#                                    #   send SNMPv1  traps trapsink     localhost public                                    #   send SNMPv2c traps#trap2sink    localhost public                                    #   send SNMPv2c INFORMs#informsink   localhost public#  Note that you typically only want *one* of these three lines#  Uncommenting two (or all three) will result in multiple copies of each notification.##  Event MIB - automatically generate alerts#                                   # Remember to activate the 'createUser' lines aboveiquerySecName   internalUser       rouser          internalUser                                   # generate traps on UCD error conditionsdefaultMonitors          yes                                   # generate traps on linkUp/DownlinkUpDownNotifications  yes#################################################################################  EXTENDING THE AGENT###  Arbitrary extension commands# extend    test1   /bin/echo  Hello, world! extend-sh test2   echo Hello, world! ; echo Hi there ; exit 35#extend-sh test3   /bin/sh /tmp/shtest#  Note that this last entry requires the script '/tmp/shtest' to be created first,#    containing the same three shell commands, before the line is uncommented#  Walk the NET-SNMP-EXTEND-MIB tables (nsExtendConfigTable, nsExtendOutput1Table#     and nsExtendOutput2Table) to see the resulting output#  Note that the "extend" directive supercedes the previous "exec" and "sh" directives#  However, walking the UCD-SNMP-MIB::extTable should still returns the same output,#     as well as the fuller results in the above tables.##  "Pass-through" MIB extension command##pass .1.3.6.1.4.1.8072.2.255  /bin/sh       PREFIX/local/passtest#pass .1.3.6.1.4.1.8072.2.255  /usr/bin/perl PREFIX/local/passtest.pl# Note that this requires one of the two 'passtest' scripts to be installed first,#    before the appropriate line is uncommented.# These scripts can be found in the 'local' directory of the source distribution,#     and are not installed automatically.#  Walk the NET-SNMP-PASS-MIB::netSnmpPassExamples subtree to see the resulting output##  AgentX Sub-agents#                                           #  Run as an AgentX master agent master          agentx                                           #  Listen for network connections (from localhost)                                           #    rather than the default named socket /var/agentx/master#agentXSocket    tcp:localhost:705



本文地址:IT问答频道 https://www.hkm168.com/itwenda/942213_3.html,易企推百科一个免费的知识分享平台,本站部分文章来网络分享,本着互联网分享的精神,如有涉及到您的权益,请联系我们删除,谢谢!

共3页 1 2 3 当前是最后一页

IT问答
小编:小易整编
相关文章相关阅读
  • 总结CreateJS的详细介绍

    总结CreateJS的详细介绍

    CreateJS库是一款HTML5游戏开发的引擎,是一套可以构建丰富交互体验的HTML5游戏的开源工具包,旨在降低HTML5项目的开发难度和成本,让开发者以熟悉的方式打造更具现代感的网络交互体验。掌握了CreateJS可以更方便的完成HTM...

  • 如何使用Vue技术进行移动端开发

    如何使用Vue技术进行移动端开发

    如何使用Vue技术进行移动端开发随着移动互联网的迅猛发展,移动端应用的开发变得越来越重要。Vue.js作为一款轻量级、高性能的前端框架,被广泛应用于移动端开发中。本文将介绍如何使用Vue技术进行移动端开发,并给出具体的代码示例。一、准备工作...

  • 什么是构造函数?详解JavaScript中的构造函数

    什么是构造函数?详解JavaScript中的构造函数

    作为原型和原型链的基础,先了解清楚构造函数以及它的执行过程才能更好地帮助我们学习原型和原型链的知识。本篇文章带大家详细了解一下javascript中的构造函数,介绍一下怎么利用构造函数创建一个js对象,希望对大家有所帮助!一个普通的函数被用...

  • 什么是Linux系统中nc命令?nc命令的用法详解

    什么是Linux系统中nc命令?nc命令的用法详解

    这篇文章主要介绍了linux系统中nc命令的基本用法,nc命令非常之强大,这里先简单介绍它用来作端口扫描以及文件传输等的基础使用。功能说明:功能强大的网络工具,在网络工具中有“瑞士军刀”美誉,其有Windows和Linux的版本。因为它短小...

  • cmd命令怎么打开?

    cmd命令怎么打开?

    cmd命令的打开方法:1、在电脑桌面中使用“win+r”组合键,打开的“运行”窗口,输入“cmd”命令并回车即可打开;2、打开“开始”菜单,在搜索框中输入“cmd”,点击“cmd.exe”即可打开。CMD一般指命令提示符,命令提示符是在操作...

  • 如何使用PHP中的字符串变量

    如何使用PHP中的字符串变量

    如何使用PHP中的字符串变量在PHP中,字符串变量是一种非常常见的数据类型,用于存储和操作文本数据。在本文中,我们将介绍如何使用PHP中的字符串变量,并提供一些具体的代码示例。字符串变量的声明和赋值在PHP中,要声明一个字符串变量,只需要使...

  • Java中的Scanner操作详解

    Java中的Scanner操作详解

    scanner是java中的一个常用类,用来读取控制台或文件中的输入数据。它提供了一种简单的方式来解析基本类型和字符串,并支持对正则表达式进行匹配。Scanner类位于java.util包中,因此在编写程序时需要import...

  • 使用Go语言进行大数据分析的常用技巧

    使用Go语言进行大数据分析的常用技巧

    使用Go语言进行大数据分析的常用技巧随着大数据时代的来临,数据分析成为了各个领域中不可或缺的一环。而Go语言作为一种强大的编程语言,其简洁、高效的特性使得它成为大数据分析的理想选择。本文将介绍一些使用Go语言进行大数据分析常用的技巧,并提供...

  • 周排行
  • 月排行
  • 年排行

精彩推荐