4 Replies Latest reply on Dec 11, 2014 7:49 AM by human

    Scripting shavlik protect-


      Is anyone programatically accessing shavlik to kick off scans or otherwise manipulate the scheduler?  We are working on automating our patching process to interface with our CMDB and ticketing system and are having trouble finding any reference material about manipulating the scheduler or extracting schedule information from the protect db.  Is anyone doing this?


      We have the scan part down pretty well - we export from our cmdb to txt files which shavlik uses to scan, but we would like more control of the actual depoloyment process.  Our CMDB is the source for truth on which maintenance window each server is patched in (many hundreds of servers).  We are basically looking for a way to control the deployment phase of the process externally.  The only command line, powershell, api, etc i've found documented is just the scheduler service command line utility, which i take to primarily be intended to be run from the client side.



      Any help would be appreciated.

        • 1. Re: Scripting shavlik protect-
          chrisgoettl SupportEmployee

          There are a couple of customers who have customized a few things, but not at an engines level.  Similar to what you described, they setup reoccurring tasks as buckets and have automated processes to move machines in and out of the txt files they link to each group. 


          Do me a favor and submit a feature request asking for this.  That will allow me to track you as we discuss anything in this area (keep you up to date on when this is coming, ask any clarifying questions, etc).  It also helps to prioritize this vs other requests.  Believe it or not, feature requests do make a difference on what makes it into the product. I have some momentum on this, but for many it is integrating with their build process.  Less ask for integration with CMDB and ticketing systems.  


          As for what you are asking for let me see if I can break this down a bit:
          1) You want the ability to call up a scan of a specific target or list of machines. 

          2) You want the ability to call up a deployment of a specific target or list of machines.

          3) It sounds like you may want the ability to manipulate members of a machine group outside of the product.


          Others, please feel free to chime in.  Also submit a feature request regarding this, but I would like to hear more about what you are looking for. 


          Chris Goettl

          Shavlik Protect Product Manager

          1 of 1 people found this helpful
          • 2. Re: Scripting shavlik protect-

            Hi Chris, Thanks for your response.  The items you called out would be of value to us, but this is the specific scenario we are dealing with right now:


            We have fully automated the scan process by writing scripts to add machines to text files so they are scanned, we then pull error information from the shavlik database and integrate into our ticketing system so tickets are opened to our support group to fix any issues. Using scripts we monitor the tickets and when we detect they are closed we add them to a nightly job to rescan.  We are now working on automating the deployment functions, we need the ability to auto deploy a group of servers on a reoccurring schedule based on a day of the month ie 2nd Sunday or 3rd Saturday similar to how scans are done. Then we would like an API or interface into the deployment mechanism so we could deploy patches and set an install date on a single or group of servers when we detect that the deployment has failed.



            • 3. Re: Scripting shavlik protect-
              chrisgoettl SupportEmployee

              So, in the next release of Protect (9.2) we are adding a new scheduling option to setup reoccurring schedules based on an anchor date (eg your 2nd Sunday or 3rd Saturday examples).  You will be able to schedule the reoccurring jobs based on that.  I am currently trying to gauge interest and applicability of opening a set of APIs.  You have a couple of good ideas here as to how you would utilized an API.  Can you submit a feature request on that if you have not already.  FYI this would not be 9.2 as that release is already loaded with goodies and there is no more room for a larger feature effort.  





              • 4. Re: Scripting shavlik protect-

                Would be really interested in an API. Would be great to be able to schedule patching via a REST API. This would allow us to to create tasks within our service management tool which will then schedule the patching task in shavlik, setup maintenance periods within our monitoring tool etc automatically.


                Would also be really useful to be able to add machine to machine groups, so that when a new machine is provisioned it is automatically added to the appropriate machine group. This would mean patching could fit into our already automated provisioning cycle.