Swapnil1988
Swapnil1988

Reputation: 289

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

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?

Upvotes: 6

Views: 21898

Answers (3)

Jason Ellison
Jason Ellison

Reputation: 51

These values are defined by the administrator. Common formats include:

syslocation Rack, Room, Building, City, Country [GPSX,Y]
syscontact Your Name <[email protected]>

If all the equipment you monitor is in the same country you can use the format google maps uses: "street, city, state zip". For example searching google maps for the white house returns:

1600 Pennsylvania Ave NW, Washington, DC 20500

syslocation is often used my monitoring applications to generate visual maps.

Upvotes: 2

Matt Coubrough
Matt Coubrough

Reputation: 3829

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.

Upvotes: 4

shivam
shivam

Reputation: 16506

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

Upvotes: 5

Related Questions