12 Replies Latest reply on Feb 18, 2018 8:51 AM by vMan

    New VROPS Rest Notification Plugin

    pierrelxlab Novice
    vExpertVMware Employees

      Hello everyone,

       

      I just added a new feature to VROPS6, It's a new Notification Plugin that is able to send custom rest request automatically when an alarm is triggered (to call a VRO workflow for example). Everything is fully integrated in the VROPS UI. So if you are dreaming of automatic cluster remediation with VRO, this thing is for you

       

       

      It's been running on my multi-node HA VROPS cluster for 2 weeks without any issue... But since it's not supported do not use it production environment.

       

       

      A few screenshots are attached to this post.

       

      Article: http://pierrelx.com/?p=373

      Installation procedure: http://pierrelx.com/?p=396

      Download: https://sourceforge.net/projects/customrestpluginvrops6/files/

       

      Cheers

       

      vrops08.png

      vcops04.png

      vrops10.png

        • 1. Re: New VROPS Rest Notification Plugin
          vSchroed Enthusiast

          This looks really cool. I might have to test it out in my lab.  I am really hoping that VMware opens up the ability to easily make your own "Actions" in vROPs 6.1 using vRO. But I guess we will have to wait and see.

           

          Thanks for sharing!

           

          Jeff

          • 2. Re: New VROPS Rest Notification Plugin
            vMan Enthusiast

            Thanks, just what i needed...

             

            I have taken your example jar and expanded on it a little by splitting up the message and find/replacing each field individually...

             

            I just have one question which i couldnt find as i cant imagine many of these plugins are built...

             

            How can I redescribe the plugin? I wanted to add some additional content-types / extra fields to the describe.xml but they do not load.

             

            I tried the redescribe under admin section but that only works for solutions...

             

            Cheers

            vMan

            • 3. Re: New VROPS Rest Notification Plugin
              vMan Enthusiast

              So after lots of digging.... I finally found where the describe.xml data is stored in the cassandra DB... anyone who wants to clean up after some testing... or redeply updates and have it re-ingest describe.xml here is how to do it... i will write a blog post about it when i get some time...

               

               

              (USE THIS AT YOUR OWN RISK!!!)

               

              Connect to the vRops via SSH, then run the cqlshrc command to connect to the Cassandra DB

               

              $VCOPS_BASE/cassandra/apache-cassandra-2.1.8/bin/cqlsh --ssl --cqlshrc $VCOPS_BASE/user/conf/cassandra/cqlshrc

               

              Confirm it is there....

               

              SELECT * FROM globalpersistence.notificationplugin WHERE namespace='notificationplugin' AND classtype='notificationplugin' AND key='AlertPluginMetadata.CustomRestPlugin' ALLOW FILTERING;

               

              Putty-cqlsh-CustomRest-describe-select.png

               

              Then delete it...

               

              DELETE FROM globalpersistence.notificationplugin WHERE namespace='notificationplugin' AND classtype='notificationplugin' AND key='AlertPluginMetadata.CustomRestPlugin';

               

               

              restart the vmware-vcops service, no need to reboot...

               

              service vmware-vcops restart

               

              vRops will then reimport describe.xml into the environment with any updates... or it will just cleanup the list.

               

              if you want to check if the update has been reimported just run the select again..

               

              SELECT * FROM globalpersistence.notificationplugin WHERE namespace='notificationplugin' AND classtype='notificationplugin' AND key='AlertPluginMetadata.CustomRestPlugin' ALLOW FILTERING;

              CustomRest-Describe-update.png

              • 4. Re: New VROPS Rest Notification Plugin
                vMan Enthusiast

                If you have the Custom Rest plugin deployed and upgrade to 6.6 or to try to deploy it to a fresh install of 6.6 it will fail on Step 4.

                 

                vRops 6.6 appears to be using Java 1.8 now and some changes to the libs have occurred, so this plugin no longer works as is but its not too hard to recompile it and get it working.

                • 5. Re: New VROPS Rest Notification Plugin
                  vMan Enthusiast

                  For those interested in pierrelxlabplugin... I have recompiled it for vRops 6.6... but please note I have not tested it in my lab.... as I have my own custom one.... but in theory it should work as I recompiled it with the new libs from 6.6 and JRE 1.8 which I used for my own version.

                   

                  If you plan to use it .... make sure to test it in a lab environment before deploying it so something more important, if the Analytics fails to start just remove the JAR and restart vRops.... (or just snapshot maybe?)

                   

                  Please post your result in here for others to know.... if it fails to work I can have a further look at it in my lab when I get time...

                   

                  I hope you don't mind me posting it pierrelxlab, I tried to contact you over your blog but it doesn't appear to have worked.... If your not happy with me posting it PM me and I will delete this post.

                   

                  Cheers

                  vMan

                  • 6. Re: New VROPS Rest Notification Plugin
                    cisupport Lurker

                    Unfortunately the updated plugin didnt work for us - we had to remove it to complete the upgrade

                    tried adding it back in post upgrade but no joy

                    happy to post logs - let us know what you want / where form though

                     

                    cheers

                    • 7. Re: New VROPS Rest Notification Plugin
                      vMan Enthusiast

                      Ok thanks for letting me know. I will sort it out this weekend on my lab and test it before I post it again.

                       

                      No need for logs, I should be able to sort it out on mine

                       

                      Cheers

                      vMan

                      • 8. Re: New VROPS Rest Notification Plugin
                        vMan Enthusiast

                        OK.... so I'm an idiot... I posted the one compiled with 1.7... and named it v66

                         

                        Here is the correct one, I just tested it and vRops Analytics starts... I did not trigger any alerts as I don't use his version of the custom integration...

                         

                        Let me know how you go with this version.

                         

                        Cheers

                        vMan

                        • 9. Re: New VROPS Rest Notification Plugin
                          pierrelxlab Novice
                          vExpertVMware Employees

                          Sorry for the late reply. Unfortunately I don't have time anymore to take care of that plugin and I failed to push it into VROPS officially. Thank you anyway for the new version you made.

                          • 10. Re: New VROPS Rest Notification Plugin
                            cisupport Lurker

                            this worked thanks, but looks like we will have to find a long term solution now cheers

                            • 11. Re: New VROPS Rest Notification Plugin
                              vMan Enthusiast

                              thanks for the reply.

                               

                              I am happy to maintain your plugin for future versions of vRops and post the file here if you have no objections...

                               

                              I update my version anyway so it is simple enough to maintain yours too.

                               

                              Cheers

                              vMan

                              • 12. Re: New VROPS Rest Notification Plugin
                                vMan Enthusiast

                                for those interested in this plugin I have released my own version of it with slightly different functionality.

                                 

                                http://vman.ch/vrops-custom-rest-outbound-plugin/

                                 

                                Cheers

                                vMan