Details

    • New Feature
    • Resolution: Unresolved
    • Minor
    • None
    • Professional Edition
    • Web Interface

    Description

      It would be nice if there was (even simple) integration to Oxidized, like there is for RANCID.

      Oxidized is a more modern implementation of RANCID (GIT vs CVS/Ruby vs Perl/TCL/Expect), and generally has a more mordern API available for integration.

      https://github.com/ytti/oxidized

      Attachments

        Activity

          [OBS-1986] Integration for Oxidized

          The existing API is the formal API. The correct way to implement this would be using a format modifier on the /devices/ endpoint to return the data in the correct format.

          adama Adam Armstrong added a comment - The existing API is the formal API. The correct way to implement this would be using a format modifier on the /devices/ endpoint to return the data in the correct format.

          I looked at that.

          But it doesn't look as though the Observium devices endpoint response format will work with Oxidized's current mapping code, even though it has the ability to specify a starting position (e.g. .devices) the code looks to be limited to iterating through a list rather than a hash/series of objects.

          Given Observium doesn't really have a formal API at this point, if the project ever gets around to creating one, having a dedicated and very simple endpoint like this gives you the freedom to modify that main devices endpoint response in future without breaking this one.

          colin.stubbs Colin Stubbs added a comment - I looked at that. But it doesn't look as though the Observium devices endpoint response format will work with Oxidized's current mapping code, even though it has the ability to specify a starting position (e.g. .devices) the code looks to be limited to iterating through a list rather than a hash/series of objects. Given Observium doesn't really have a formal API at this point, if the project ever gets around to creating one, having a dedicated and very simple endpoint like this gives you the freedom to modify that main devices endpoint response in future without breaking this one.

          Why not just use the existing devices endpoint?

          adama Adam Armstrong added a comment - Why not just use the existing devices endpoint?

          Great! When it will be public I will show it to our software developers to check versus our custom solution that we developed to use Oxidized in Observium.

           

          dklimek Denis Klimek added a comment - Great! When it will be public I will show it to our software developers to check versus our custom solution that we developed to use Oxidized in Observium.  
          colin.stubbs Colin Stubbs added a comment - - edited

          Additional patches to have Observium use Oxidized API and trigger config collection for this are in progress

          colin.stubbs Colin Stubbs added a comment - - edited Additional patches to have Observium use Oxidized API and trigger config collection for this are in progress
          colin.stubbs Colin Stubbs added a comment - - edited

          Newly attached patch adds /api/v0/oxidized endpoint.

          This allows Oxidized to obtain a device list to attempt to poll via the Observium API.

          Described here: https://github.com/ytti/oxidized/blob/master/docs/Sources.md#source-http

          Example config snippet for Oxidized to Observium is,

           

          source:
            default: http
            debug: true
            http:
              url: https://observium.your.domain/api/v0/oxidized
              map:
                name: hostname
                model: os
                group: type
            headers:
              Authorization: 'Basic YWRtaW46YWRtaW4='

           

          colin.stubbs Colin Stubbs added a comment - - edited Newly attached patch adds /api/v0/oxidized endpoint. This allows Oxidized to obtain a device list to attempt to poll via the Observium API. Described here:  https://github.com/ytti/oxidized/blob/master/docs/Sources.md#source-http Example config snippet for Oxidized to Observium is,   source: default : http debug: true http: url: https: //observium.your.domain/api/v0/oxidized map: name: hostname model: os group: type headers: Authorization: 'Basic YWRtaW46YWRtaW4='  
          colin.stubbs Colin Stubbs added a comment - - edited

          The ideal integration here would actually utilise the Oxidized API so the Oxidized system can exist anywhere; rather than on a file system immediately accessible to the Observium webUI.

          e.g. config from https://oxidized-not-obserivum-server.org.tld/node/fetch/[NODE]

          Observium would also expose a list of hosts (may already be in API?); that Oxidized would use as a list of devices to monitor,

          https://github.com/ytti/oxidized/blob/master/docs/Sources.md#source-http

          Syslog (SNMP trap to syslog where necessary) alerting matches for config change events would trigger Oxidized based collection of new config; which in turn would trigger Oxidized based alerts in close to real time for changes.

           

          colin.stubbs Colin Stubbs added a comment - - edited The ideal integration here would actually utilise the Oxidized API so the Oxidized system can exist anywhere; rather than on a file system immediately accessible to the Observium webUI. e.g. config from https://oxidized-not-obserivum-server.org.tld/node/fetch/[NODE] Observium would also expose a list of hosts (may already be in API?); that Oxidized would use as a list of devices to monitor, https://github.com/ytti/oxidized/blob/master/docs/Sources.md#source-http Syslog (SNMP trap to syslog where necessary) alerting matches for config change events would trigger Oxidized based collection of new config; which in turn would trigger Oxidized based alerts in close to real time for changes.  

          I still don't think there's any further work to be done on this. It works for us without code modification, using the config that I posted a year ago. 

          stevenr Steven Robson added a comment - I still don't think there's any further work to be done on this. It works for us without code modification, using the config that I posted a year ago. 
          nexeonjesse Jesse added a comment -

          Is work still being done on this? I noticed it's marked as in progress but there hasn't been any updates in some time.

          nexeonjesse Jesse added a comment - Is work still being done on this? I noticed it's marked as in progress but there hasn't been any updates in some time.

          We already use Oxidized with Observium (pro version). I don't think there's any code update required - it works with the existing rancid code. 

          $config['rancid_version'] = '3'; // In generate-rancid.php use delimeter ':' (by default) and ';' for v3
          $config['rancid_configs'] = array('/usr/local/share/oxidized/obsconfigs');
          $config['rancid_ignorecomments'] = 0; // Ignore lines starting with #
          $config['rancid']['os_map']['h3c'] = 'comware';
          $config['rancid']['os_map']['hh3c'] = 'comware';

          We need this Oxidized update hook:

          git_update_hook:
          type: exec
          events: [post_store]
          cmd: 'sh -c "cd /usr/local/share/oxidized/obsconfigs && git pull"'
          async: true
          timeout: 300

          So Oxidized checks the new code into git, and then immediately pulls it into a dir that contains the latest config, and Observium picks that up. 

          stevenr Steven Robson added a comment - We already use Oxidized with Observium (pro version). I don't think there's any code update required - it works with the existing rancid code.  $config ['rancid_version'] = '3'; // In generate-rancid.php use delimeter ':' (by default) and ';' for v3 $config ['rancid_configs'] = array('/usr/local/share/oxidized/obsconfigs'); $config ['rancid_ignorecomments'] = 0; // Ignore lines starting with # $config ['rancid'] ['os_map'] ['h3c'] = 'comware'; $config ['rancid'] ['os_map'] ['hh3c'] = 'comware'; We need this Oxidized update hook: git_update_hook: type: exec events: [post_store] cmd: 'sh -c "cd /usr/local/share/oxidized/obsconfigs && git pull"' async: true timeout: 300 So Oxidized checks the new code into git, and then immediately pulls it into a dir that contains the latest config, and Observium picks that up. 

          I'd also be happy to help working on this feature, if there is anything to do.

          dherrman Daniel Herrmann added a comment - I'd also be happy to help working on this feature, if there is anything to do.

          People

            landy Mike Stupalov
            Jensen Michael
            Votes:
            14 Vote for this issue
            Watchers:
            20 Start watching this issue

            Dates

              Created:
              Updated: