freebsd-dev/contrib/ntp/ntpsnmpd
Gleb Smirnoff 9034852c84 MFV ntp-4.2.8p4 (r289715)
Security:       VuXML: c4a18a12-77fc-11e5-a687-206a8a720317
Security:	CVE-2015-7871
Security:	CVE-2015-7855
Security:	CVE-2015-7854
Security:	CVE-2015-7853
Security:	CVE-2015-7852
Security:	CVE-2015-7851
Security:	CVE-2015-7850
Security:	CVE-2015-7849
Security:	CVE-2015-7848
Security:	CVE-2015-7701
Security:	CVE-2015-7703
Security:	CVE-2015-7704, CVE-2015-7705
Security:	CVE-2015-7691, CVE-2015-7692, CVE-2015-7702
Security:	http://support.ntp.org/bin/view/Main/SecurityNotice#October_2015_NTP_Security_Vulner
Sponsored by:	Nginx, Inc.
2015-10-22 19:42:57 +00:00
..
invoke-ntpsnmpd.menu
invoke-ntpsnmpd.texi MFV ntp-4.2.8p4 (r289715) 2015-10-22 19:42:57 +00:00
Makefile.am
Makefile.in MFV ntp-4.2.8p4 (r289715) 2015-10-22 19:42:57 +00:00
netsnmp_daemonize.c
ntp_snmp.h
ntpsnmpd-opts.c MFV ntp-4.2.8p4 (r289715) 2015-10-22 19:42:57 +00:00
ntpsnmpd-opts.def
ntpsnmpd-opts.h MFV ntp-4.2.8p4 (r289715) 2015-10-22 19:42:57 +00:00
ntpsnmpd.1ntpsnmpdman MFV ntp-4.2.8p4 (r289715) 2015-10-22 19:42:57 +00:00
ntpsnmpd.1ntpsnmpdmdoc MFV ntp-4.2.8p4 (r289715) 2015-10-22 19:42:57 +00:00
ntpsnmpd.c
ntpsnmpd.html MFV ntp-4.2.8p4 (r289715) 2015-10-22 19:42:57 +00:00
ntpsnmpd.man.in MFV ntp-4.2.8p4 (r289715) 2015-10-22 19:42:57 +00:00
ntpsnmpd.mdoc.in MFV ntp-4.2.8p4 (r289715) 2015-10-22 19:42:57 +00:00
ntpsnmpd.texi
ntpSnmpSubagentObject.c
ntpSnmpSubagentObject.h
ntpv4-mib.mib
README

NTP SNMP subagent for Net-SNMP

Installation Guides:

- install net-snmp from source (configure, make;, make install)
- edit the snmpd configuration file (/usr/local/share/snmp/snmpd.conf):
  add the lines
   master agentx
   agentXSocket   tcp:localhost:705
  and check which read-only community is configured (should be "rocommunity  public")  
- start snmpd (sudo /usr/local/sbin/snmpd) and check that it is running correctly by running the command
  snmpwalk -v2c -c public localhost
  (which should output a lot of data values for the supported built-in MIBs of net-snmp)
- build the libntpq and the libntp library
- build the ntpsnmpd application (make) and run it (./ntpsnmpd)
- now you can run 
   snmpwalk -v2c -c public localhost enterprises.5597.99
  which should give you a list of all currently supported NTP MIB objects and their current values
  
Please note that currently I use a private MIB OID (enterprises.5597 is the Meinberg top level OEM OID and 99 is my temporary working space for this project). 
The final OID has to be registered with IANA and this is done by the RFC Editor when the NTPv4 MIB RFC is standardized. 
I will try to do this earlier in order to be able to have a working solution at the end of this project.

In its current state the daemon supports these objects:

ntpEntSoftwareName
ntpEntSoftwareVersion
ntpEntSoftwareVersionVal
ntpEntSoftwareVendor
ntpEntSystemType
ntpEntTimeResolution
ntpEntTimeResolutionVal
ntpEntTimePrecision
ntpEntTimePrecisionVal
ntpEntTimeDistance

They all use the libntpq library to access information from the ntpd instance with mode 6 packets.

Next step is to implement the status section of the MIB (section 2).