If you’re a LogicMonitor customer, you already know that our platform can automate the setup of monitoring for hundreds of common devices with pre-configured datasources. But what if the device you are trying to monitor is not already in our core repository? If it supports SNMP (or one of a myriad of other protocols – but we’ll only cover SNMP here), you can build a custom datasource.
Before you begin, though, you should know that there isn’t a “one size fits all” approach when it comes to creating an SNMP datasource. The development process involves too many variables to ever take 100% of the guess work out of SNMP Datasource development.
That being said, the following steps summarize the overall process for creating an SNMP Datasource:
- Identify a need: If you have a problem in your infrastructure, you want to figure out a way to prevent it in the future. Ideally you’ll be able to create a datasource capable of detecting the condition in advance, and warning you so you can correct it. Some conditions do not provide early warnings (such as sudden drive failures) – but you want to alert on these as soon as possible.
- Research: You want to get as much as information as possible for the device you want to monitor. Try to find MIBs and monitoring best practices for that device. Then look through the MIB and find what metrics you can get. A few considerations:
- What are the possible scenarios where things can go wrong with the device?
- What problems can occur when these things go wrong?
- How can you prevent these problems?
- Design a schema: Are you going to need one or more datasources? Will they be single or multi-instance datasources? If you have to detect whether a device supports zero, one or multiple of a type of thing (such as interfaces), you’ll need a separate multi-instance datasource for each class of object. If there is one and only one set of data for attributes of a device (such as total CPU load, memory usage) then you can put all that data in a single datasource – but it may make sense to split the information into related datasources (a CPU datasource and a Memory datasource, or a combined Usage datasource?)
- Build a prototype datasource: Pick metrics that you want to monitor, and specify the OIDs for these metrics in datapoints. Remember that not everything in the MIB will be useful, and you should only monitor things that are worth monitoring.
- Verify in the real world: Wait and collect data for a little while to verify that your prototype is working, and that the data makes sense. If everything looks good, you can start applying the datasource to other devices. Ideally, you want to force (or simulate) failures, and ensure your datasources alert you appropriately, and shows you graphical information that make the diagnoses easier.
Remember, you should create your datasources in a way that works best for your use case. The ability to customize datasources to fit your needs is one of the things that makes LogicMonitor so powerful.
Want to learn more? View our pre-recorded LogicMonitor training on building SNMP datasources. We’ll walk you through the process of creating SNMP datasources for an WTI MPC PDU (Managed Power Controller Power Distribution Unit) and how to apply these principles.
Want to set up your own datasources? Want training on another topic? Tell us more in comments below.