Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the sysLocation and sysContact objects in snmpd.conf?

Tags:

snmp

I am trying to configure SNMP on Ubuntu 14.04. There is a step where I have to edit the community string along with sysLocation and sysContact but I am not sure what goes there. What are the sysLocation and sysContact objects in the snmpd.conf file and how I can get those values for my machine?

like image 291
Swapnil1988 Avatar asked Dec 08 '14 06:12

Swapnil1988


People also ask

What is sysLocation?

sysLocation specifies the physical location of the computer. You can use this setting in core installations of Windows Server 2008, Windows Server 2008 R2, and Windows Server 2012, by enabling SNMP-SC in the Windows Foundation package.

What is Snmpd conf?

Description. The snmpd. conf file provides the configuration information for the snmpdv1 agent. This file can be changed while the snmpdv1 agent is running. If the refresh or kill -1 command is issued, the snmpdv1 agent will reread this configuration file.

Where is the Snmpd conf file?

local. conf) can be located in one of several locations, as described in the snmp_config manual page. In particular, ROOTDIR/usr/share/snmp/snmp. conf is a common file, containing the settings shared by all users of the system.

What is Snmpd Linux?

snmpd is an SNMP agent which binds to a port and awaits requests from SNMP management software. Upon receiving a request, it processes the request(s), collects the requested information and/or performs the requested operation(s) and returns the information to the sender.


2 Answers

All SNMP devices share the following common configurable parameters:

  • sysLocation
  • sysContact
  • sysName
  • Read-write and read-only access community strings (and frequently, a trap community string)
  • Trap destination

sysLocation is the physical location for the device being monitored. Its definition in RFC 1213 is:

sysLocation OBJECT-TYPE
    SYNTAX  DisplayString (SIZE (0..255))
    ACCESS  read-write
    STATUS  mandatory
    DESCRIPTION
        "The physical location of this node (e.g., 'telephone closet,
         3rd floor')."
    ::= { system 6 }

RFC 1213's definition of sysContact is similar to that of sysLocation:

sysContact OBJECT-TYPE
    SYNTAX  DisplayString (SIZE (0..255))
    ACCESS  read-write
    STATUS  mandatory
    DESCRIPTION
        "The textual identification of the contact person for this managed
         node, together with information on how to contact this person."
    ::= { system 4 }

sysContact is a DisplayString. It's fairly obvious what it's used for: it identifies the primary contact for the device in question. It is important to set this object with an appropriate value, as it can help your operations staff determine who needs to be contacted in the event of some catastrophic failure. You can also use it to make sure you're notified, if you're responsible for a given device, when someone needs to take your device down for maintenance or repairs. As with sysLocation, make sure to keep this information up to date as your staff changes. It's not uncommon to find devices for which the sysContact is someone who left the company several years ago.

source: http://docstore.mik.ua/orelly/networking_2ndEd/snmp/ch07_01.htm

like image 172
shivam Avatar answered Sep 19 '22 15:09

shivam


SysLocation and SysContact are simply arbitrary SNMP string variables that are part of SNMPV2-MIB and can be fetched with SNMP get.

OID 1.3.6.1.2.1.1.4 == SysContact
OID 1.3.6.1.2.1.1.6 == SysLocation

Most sites I have been involved with use SysLocation as a decription of the location of the SNMP managed network device, and SysContact as the contact details of somebody who is in some way responsible for the device.

Warning: SysContact also has a habit of becoming out of date without being modified when staff changes.

To get sysContact using snmpget command line:

snmpget -v1 -c public localhost system.sysContact.0

where "public" is your community string, and "localhost" is the ip address of the machine you want to send the SNMP query to.

like image 43
Matt Coubrough Avatar answered Sep 21 '22 15:09

Matt Coubrough