DX Unified Infrastructure Management

 View Only
  • 1.  Automation through puppet

    Posted Jul 31, 2014 02:16 AM

    Hello Nimsoft users,

     

    I'd like to know if anyone else uses puppet and may already try to integrate your monitoring configuration into your configuration management.

     

    Because I'm a puppet fan and love automation I started a hobby project to write some puppet plugins to modify cfx files directly. At $WORK we successfully use that to automatically monitor new sap instances, new oracle instances, application specific devices, logfiles, etc and I'd like to know if this may be of actual value to others. So any feedback is more than welcome.

    https://github.com/stschulte/puppet-nimsoft

     

    I'm also always interested to hear what others  - not necessary with puppet - have already automated (like robot deployment, hub deployment, probe deployment, clean deletion of robots, etc)



  • 2.  Re: Automation through puppet

    Posted Jul 31, 2014 09:34 AM

    We currently use puppet to do the initial install of the robot, but hands off after that.

     

    It would be nice to do further configuration management thru puppet, but there are some challenges to doing that. Specifically if you want to be able to still do configuration thru Infrastructure Manager.

     

    But I would also be interested in hearing if anyone were doing probe configuration thru puppet.



  • 3.  Re: Automation through puppet

    Posted Jul 31, 2014 10:35 PM
    the puppet-nimsoft plugin I mentioned earlier will only manage the part of the cfg file that you care about. So if you take the oracle probe: We ship the basic configuration like checkpoints, loglevel etc with a nimsoft package and use puppet to make sure that we have a profile for each database. Same goes for the cdm probe: We ship a default disk section with nimsoft and only use puppet to manage application specific devices that nimsoft does not know about.


  • 4.  Re: Automation through puppet

    Posted Aug 01, 2014 09:27 AM

    But how do you restart the probe after you update the config with puppet? And how do you deploy the application specific probes? And how do you deal with the robot often getting sad when the config files are edited from the outside? And what about when the robot changes order in the file when someone uses IM to add something else? (asking out of curiousity :smileyhappy:)



  • 5.  Re: Automation through puppet

    Posted Aug 01, 2014 09:00 PM
    • The git repository includes a script restart_probe.sh that runs on the robot and looks into the controller directory to find out the process id of the probe and kills the probe by sending it a SIGTERM signal. The script will then wait until the probe terminates and the controller restarts the probe (which happens immediatly)
    • For probe deployment we have a script (not included in the repository) that also runs on the robot and sends an alarm with the nimalarm utility with a message string something like autooperator:getprobe:smileytongue:robe=oracle and a profile in the NAS that picks up the event and creates a job for the distsrv probe to distribute the probe. The script that runs on the robot will not only send the nimalarm, it will also wait until the logfile of the probe is present. That's a good indication that the probe was sucessfully deployed and is now running. So in short: on robot: send nimalarm, wait for the logfile of the requested probe to appear on NMS server: pick up alarm, run lua script, create job for distribution serverAgain we use an exec resource in puppet to trigger the request_probe.sh script if the probe is not yet present
    • You can still manage everything in IM if you like, the puppet plugins will not simply drop configuration snippets somewhere in the file. Instead it parses the configuration into a tree structure, changes stuff if necessary and writes the changes back to disk. So e.g. you can specify
      nimsoft_oracle_connection { 'PROD':
        ensure     => present,
        connection => 'host.example.com:1521/PROD',
        user       => 'nmuser',
        password   => 'secret',
      }
          
      then puppet will add the connection if not already present and it will change connect, user and password if they are out of sync. But if you now want to change the description of the connection through IM you are free to do that because puppet will (like any other resource) only check the parameters that you've specified in your manifest. It does not matter if IM now shifts the different sections around or changes the ordering of the attributes.


  • 6.  Re: Automation through puppet

    Posted Aug 04, 2014 03:41 PM

    Very interesting! Will certainly have to have a closer look at this. Thank you :smileyhappy: