Creating node/host defintions for OpenNMS requisitions


#1

Hey!

I’m here to get some information and if it’s worth to try Foreman for my requirements.
Since Foreman has this datacenter plugin I was thinking about to use Foreman as documentation tool.
But it would be really cool to feed our monitoring with definitions which could be (hopefully) provided by Foreman.

We are using OpenNMS and a node definition looks like this:

   <node foreign-id="HOSTNAME" node-label="NODE-LABEL">
      <interface ip-addr="IPADDRESS" snmp-primary="P">
         <monitored-service service-name="SNMP"/>
         <monitored-service service-name="ICMP"/>
         <monitored-service service-name="SSH"/>
      </interface>
      <category name="CATEGORY1"/>
      <category name="CATERORY2"/>
      <asset name="address1" value="STREET"/>
      <asset name="zip" value="ZIP"/>
   </node>

The really important part is, to assign services on IP interfaces. Also different assets and categories are required which should be mapped on a node.

Since you are more experienced using Foreman, I would like to get some feedback if this logic can be handled by Foreman.

Thanks in advance!


#2

Hey, I am not aware of any OpenNMS integration so Foreman cannot do anything like this out of box. However you will find all the information in Foreman database (hostnames, NICs) and using the datacenter plugin you can provide more info and fetch that of course.

You can write our own plugin or develop an 3rd party app accessing the data via our API (the datacenter plugin does provide API as well). If you aim to export this XML on a daily basis, you can write a Rake task as well, that would be probably the easiest way of doing this.


#3

@lzap Thanks for your feedback.

For ONMS I need a logic to assign a service like ICMP, HTTP, SNMP etc on an IP interface. Reading this information from the Foremans database would be very easy. But if Foreman isn’t designed to model that, it’s gonna be complicated.

It’s very cool, that others can provide plugins for Foreman. But I’m not a developer, so I can’t do it.