NET-SNMP-EXTEND-MIB.txt 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. NET-SNMP-EXTEND-MIB DEFINITIONS ::= BEGIN
  2. --
  3. -- Defines a framework for scripted extensions
  4. --
  5. IMPORTS
  6. nsExtensions FROM NET-SNMP-AGENT-MIB
  7. OBJECT-TYPE, NOTIFICATION-TYPE, MODULE-IDENTITY, Integer32
  8. FROM SNMPv2-SMI
  9. OBJECT-GROUP, NOTIFICATION-GROUP
  10. FROM SNMPv2-CONF
  11. DisplayString, RowStatus, StorageType FROM SNMPv2-TC;
  12. netSnmpExtendMIB MODULE-IDENTITY
  13. LAST-UPDATED "201003170000Z"
  14. ORGANIZATION "www.net-snmp.org"
  15. CONTACT-INFO
  16. "postal: Wes Hardaker
  17. P.O. Box 382
  18. Davis CA 95617
  19. email: net-snmp-coders@lists.sourceforge.net"
  20. DESCRIPTION
  21. "Defines a framework for scripted extensions for the Net-SNMP agent."
  22. REVISION "201003170000Z"
  23. DESCRIPTION
  24. "Fixed inconsistencies in the definition of nsExtendConfigTable."
  25. REVISION "200405080000Z"
  26. DESCRIPTION
  27. "First revision."
  28. ::= { nsExtensions 1 }
  29. nsExtendObjects OBJECT IDENTIFIER ::= { nsExtensions 2}
  30. nsExtendGroups OBJECT IDENTIFIER ::= { nsExtensions 3}
  31. nsExtendNumEntries OBJECT-TYPE
  32. SYNTAX INTEGER
  33. MAX-ACCESS read-only
  34. STATUS current
  35. DESCRIPTION
  36. "The number of rows in the nsExtendConfigTable"
  37. ::= { nsExtendObjects 1 }
  38. nsExtendConfigTable OBJECT-TYPE
  39. SYNTAX SEQUENCE OF NsExtendConfigEntry
  40. MAX-ACCESS not-accessible
  41. STATUS current
  42. DESCRIPTION
  43. "A table of scripted extensions - configuration and (basic) output."
  44. ::= { nsExtendObjects 2 }
  45. nsExtendConfigEntry OBJECT-TYPE
  46. SYNTAX NsExtendConfigEntry
  47. MAX-ACCESS not-accessible
  48. STATUS current
  49. DESCRIPTION
  50. "A conceptual row within the extension table."
  51. INDEX { nsExtendToken }
  52. ::= { nsExtendConfigTable 1 }
  53. NsExtendConfigEntry ::= SEQUENCE {
  54. nsExtendToken DisplayString,
  55. nsExtendCommand DisplayString,
  56. nsExtendArgs DisplayString,
  57. nsExtendInput DisplayString,
  58. nsExtendCacheTime INTEGER,
  59. nsExtendExecType INTEGER,
  60. nsExtendRunType INTEGER,
  61. nsExtendStorage StorageType,
  62. nsExtendStatus RowStatus
  63. }
  64. --
  65. -- The configuration of an extension command
  66. --
  67. nsExtendToken OBJECT-TYPE
  68. SYNTAX DisplayString
  69. MAX-ACCESS not-accessible
  70. STATUS current
  71. DESCRIPTION
  72. "An arbitrary token to identify this extension entry"
  73. ::= { nsExtendConfigEntry 1 }
  74. nsExtendCommand OBJECT-TYPE
  75. SYNTAX DisplayString
  76. MAX-ACCESS read-create
  77. STATUS current
  78. DESCRIPTION
  79. "The full path of the command binary (or script) to run"
  80. ::= { nsExtendConfigEntry 2 }
  81. nsExtendArgs OBJECT-TYPE
  82. SYNTAX DisplayString
  83. MAX-ACCESS read-create
  84. STATUS current
  85. DESCRIPTION
  86. "Any command-line arguments for the command"
  87. DEFVAL { ''H } -- the empty string
  88. ::= { nsExtendConfigEntry 3 }
  89. nsExtendInput OBJECT-TYPE
  90. SYNTAX DisplayString
  91. MAX-ACCESS read-create
  92. STATUS current
  93. DESCRIPTION
  94. "The standard input for the command"
  95. DEFVAL { ''H } -- the empty string
  96. ::= { nsExtendConfigEntry 4 }
  97. nsExtendCacheTime OBJECT-TYPE
  98. SYNTAX INTEGER
  99. MAX-ACCESS read-create
  100. STATUS current
  101. DESCRIPTION
  102. "The length of time for which the output of
  103. this command will be cached. During this time,
  104. retrieving the output-related values will not
  105. reinvoke the command.
  106. A value of -1 indicates that the output results
  107. should not be cached at all, and retrieving each
  108. individual output-related value will invoke the
  109. command afresh."
  110. DEFVAL { 5 }
  111. ::= { nsExtendConfigEntry 5 }
  112. nsExtendExecType OBJECT-TYPE
  113. SYNTAX INTEGER
  114. { exec (1), -- 'fork-and-exec'
  115. shell (2) -- run via a sub-shell
  116. }
  117. MAX-ACCESS read-create
  118. STATUS current
  119. DESCRIPTION
  120. "The mechanism used to invoke the command."
  121. DEFVAL { exec }
  122. ::= { nsExtendConfigEntry 6 }
  123. nsExtendRunType OBJECT-TYPE
  124. SYNTAX INTEGER
  125. { run-on-read (1),
  126. run-on-set (2),
  127. run-command (3)
  128. }
  129. MAX-ACCESS read-create
  130. STATUS current
  131. DESCRIPTION
  132. "Used to implement 'push-button' command invocation.
  133. The command for a 'run-on-read' entry will be invoked
  134. whenever one of the corresponding output-related
  135. instances is requested (and assuming the cached value
  136. is not still current).
  137. The command for a 'run-on-set' entry will only be invoked
  138. on receipt of a SET assignment for this object with the
  139. value 'run-command'.
  140. Reading an instance of this object will always return either
  141. 'run-on-read' or 'run-on-set'.
  142. "
  143. DEFVAL { run-on-read }
  144. ::= { nsExtendConfigEntry 7 }
  145. --
  146. -- Standard table-manipulation objects
  147. --
  148. nsExtendStorage OBJECT-TYPE
  149. SYNTAX StorageType
  150. MAX-ACCESS read-create
  151. STATUS current
  152. DESCRIPTION
  153. "The storage type for this conceptual row."
  154. DEFVAL { volatile }
  155. ::= { nsExtendConfigEntry 20 }
  156. nsExtendStatus OBJECT-TYPE
  157. SYNTAX RowStatus
  158. MAX-ACCESS read-create
  159. STATUS current
  160. DESCRIPTION
  161. "Used to create new rows in the table, in the standard manner.
  162. Note that is valid for an instance to be left with the value
  163. notInService(2) indefinitely - i.e. the meaning of 'abnormally
  164. long' (see RFC 2579, RowStatus) for this table is infinite."
  165. ::= { nsExtendConfigEntry 21 }
  166. --
  167. -- The results of running the extension command
  168. --
  169. nsExtendOutput1Table OBJECT-TYPE
  170. SYNTAX SEQUENCE OF NsExtendOutput1Entry
  171. MAX-ACCESS not-accessible
  172. STATUS current
  173. DESCRIPTION
  174. "A table of scripted extensions - configuration and (basic) output."
  175. ::= { nsExtendObjects 3 }
  176. nsExtendOutput1Entry OBJECT-TYPE
  177. SYNTAX NsExtendOutput1Entry
  178. MAX-ACCESS not-accessible
  179. STATUS current
  180. DESCRIPTION
  181. "A conceptual row within the extension table."
  182. AUGMENTS { nsExtendConfigEntry }
  183. ::= { nsExtendOutput1Table 1 }
  184. NsExtendOutput1Entry ::= SEQUENCE {
  185. nsExtendOutput1Line DisplayString,
  186. nsExtendOutputFull DisplayString,
  187. nsExtendOutNumLines Integer32,
  188. nsExtendResult Integer32
  189. }
  190. nsExtendOutput1Line OBJECT-TYPE
  191. SYNTAX DisplayString
  192. MAX-ACCESS read-only
  193. STATUS current
  194. DESCRIPTION
  195. "The first line of output from the command"
  196. ::= { nsExtendOutput1Entry 1 }
  197. nsExtendOutputFull OBJECT-TYPE
  198. SYNTAX DisplayString
  199. MAX-ACCESS read-only
  200. STATUS current
  201. DESCRIPTION
  202. "The full output from the command, as a single string"
  203. ::= { nsExtendOutput1Entry 2 }
  204. nsExtendOutNumLines OBJECT-TYPE
  205. SYNTAX Integer32
  206. MAX-ACCESS read-only
  207. STATUS current
  208. DESCRIPTION
  209. "The number of lines of output (and hence
  210. the number of rows in nsExtendOutputTable
  211. relating to this particular entry)."
  212. ::= { nsExtendOutput1Entry 3 }
  213. nsExtendResult OBJECT-TYPE
  214. SYNTAX Integer32
  215. MAX-ACCESS read-only
  216. STATUS current
  217. DESCRIPTION
  218. "The return value of the command."
  219. ::= { nsExtendOutput1Entry 4 }
  220. --
  221. -- The line-based output table
  222. --
  223. nsExtendOutput2Table OBJECT-TYPE
  224. SYNTAX SEQUENCE OF NsExtendOutput2Entry
  225. MAX-ACCESS not-accessible
  226. STATUS current
  227. DESCRIPTION
  228. "A table of (line-based) output from scripted extensions."
  229. ::= { nsExtendObjects 4 }
  230. nsExtendOutput2Entry OBJECT-TYPE
  231. SYNTAX NsExtendOutput2Entry
  232. MAX-ACCESS not-accessible
  233. STATUS current
  234. DESCRIPTION
  235. "A conceptual row within the line-based output table."
  236. INDEX { nsExtendToken, nsExtendLineIndex }
  237. ::= { nsExtendOutput2Table 1 }
  238. NsExtendOutput2Entry ::= SEQUENCE {
  239. nsExtendLineIndex INTEGER,
  240. nsExtendOutLine DisplayString
  241. }
  242. nsExtendLineIndex OBJECT-TYPE
  243. SYNTAX INTEGER(1..1024)
  244. MAX-ACCESS not-accessible
  245. STATUS current
  246. DESCRIPTION
  247. "The index of this line of output.
  248. For a given nsExtendToken, this will run from
  249. 1 to the corresponding value of nsExtendNumLines."
  250. ::= { nsExtendOutput2Entry 1 }
  251. nsExtendOutLine OBJECT-TYPE
  252. SYNTAX DisplayString
  253. MAX-ACCESS read-only
  254. STATUS current
  255. DESCRIPTION
  256. "A single line of output from the extension command."
  257. ::= { nsExtendOutput2Entry 2 }
  258. --
  259. -- Conformance-related definitions
  260. --
  261. nsExtendConfigGroup OBJECT-GROUP
  262. OBJECTS {
  263. nsExtendCommand, nsExtendArgs, nsExtendInput,
  264. nsExtendCacheTime, nsExtendExecType, nsExtendRunType,
  265. nsExtendStorage, nsExtendStatus, nsExtendNumEntries
  266. }
  267. STATUS current
  268. DESCRIPTION
  269. "Objects relating to the configuration of extension commands."
  270. ::= { nsExtendGroups 1 }
  271. nsExtendOutputGroup OBJECT-GROUP
  272. OBJECTS {
  273. nsExtendOutNumLines, nsExtendResult,
  274. nsExtendOutLine, nsExtendOutput1Line, nsExtendOutputFull
  275. }
  276. STATUS current
  277. DESCRIPTION
  278. "Objects relating to the output of extension commands."
  279. ::= { nsExtendGroups 2 }
  280. END