Extending Smart-Snmpd

Jens Rehsack

July 29, 2011
Contents
1 Introduction
2 Extensibility

Contents

1 Introduction
 1.1 Audience
2 Extensibility
 2.1 External Executables
  2.1.1 Interaction between External Command and Agent
  2.1.2 Data Format
 2.2 Agent eXtensibility Protocol (AgentX)
 2.3 Dynamic Libraries

1 Introduction

1.1 Audience

This document targets developers or operators (DevOps) who have to cover a wider range of metrics via smart-snmpd.

To learn how to instruct smart-snmpd to deliver the new metrics, refer to the ”Operation Guide for Smart-Snmpd” in the OPERATION document.

2 Extensibility

2.1 External Executables

Smart-snmpd comes with support to read metrics from the output of external executables. The executable is called in a configured interval and the delivered output is placed below the oid ”.100” under the configured root oid of the external command.

How external command MIBs can be configured is described in the section ”Setting up External Command MIBs” in the ”Operation Guide for Smart-Snmpd”.

2.1.1 Interaction between External Command and Agent

The smart-snmpd will execute the configured command as configured without passing the command line to a shell. It’s guaranteed that the smart-snmpd runs the same command once only. The same command means, each configured external command. Defining several external MIBs using the identical external command results from the agent’s perspective in different commands. The guarantee is limited that the command X is not executed again before it finishes the running one.

The smart-snmpd observes the stdout, stderr, exit code and exit signal of each executed process. It sets timestamps for each execution start, end and successful MIB update.

Please refer to SMART-SNMP-MIB distributed with smart-snmpd to learn the oids how the observed metrics are made checkable.

2.1.2 Data Format

Smart-snmpd expects the external command writes a list of three-piece-tuples in JavaScript Object Notation (JSON).

[ 
[ .1, 4, Hello world ], 
[ .2, 2, 42 ] 
]

The delivered oids must not include the base oids.

2.2 Agent eXtensibility Protocol (AgentX)

Allowing smart-snmpd being extended via sub-agents using the AgentX protocol is a future task.

2.3 Dynamic Libraries

Allowing smart-snmpd being extended via external shared libraries is a future task.