4 Replies Latest reply on Feb 12, 2010 9:26 AM by W. de Heiden

    Availability interval time

    W. de Heiden Newbie

      How can I change the interval time of the availability check? Some resources I want to check every 5 minutes, for some it is okay to check once every hour.

       

      Using the "proces check" I seem to be able to change the interval by changing all of the schdule of the metrics but I don't know whether this is the right way to do so.

        • 1. Re: Availability interval time
          mazz Master

          The availability check that the plugin container performs is the same across the whole inventory. The default is every 5 minutes today.

           

          However, there is one way that can speed up the availability checking by allowing some resources to perform "asynchronous availability checking".

           

          See this wiki page for more information on how you can write your plugins to use this:

           

          http://rhq-project.org/display/RHQ/Design-Asynchronous+Availability+Collector

           

          There are a few plugins that use this today - the JBossAS 4 and 5 plugins I believe use this. There may be one other, can't remember.

          • 2. Re: Availability interval time
            W. de Heiden Newbie

            As far as I understand the article you mentioned is about how long a plugin will wait before a check will return "available" or "unavailable". However, what I mean I would like to be able to change the interval between checks.

             

            As far as I understand this is done bu the rhq-agent by settingthis entry in agent-configuration.xml

            entry key="rhq.agent.plugins.availability-scan.period-secs" value="300"

            The default value is 300 seconds, 5 minutes.

            I wonder if it is possible to change this value per resource; for example:
            - check process sendmail every minute
            - check jboss Application server every 5 minutes (default)
            - check free disk space every 2 hours

            • 3. Re: Availability interval time
              mazz Master

              "check free disk space every 2 hours" is a measurement on the File System resource. You CAN tell it to check the free disk space every 2 hours (you just change the "collection interval" of that measurement). This is not an "availability check".

               

              Availability is a "special measurement". rhq.agent.plugins.availability-scan.period-secs is for all resources - you cannot configure them differently for different resources.

               

              Asynchronous avail checking does do what you want - but it requires the plugins to use it. The JBoss plugin does use it today, so "check jboss Application server every 5 minutes (default)" you can do.

               

              To explain further - the rhq.agent.plugins.availability-scan.period-secs defines the time when the *plugin container* calls into the *plugins* asking for availability. Normally, its at this same time the plugins talk directly to the managed resources themselves to get the real availability (i.e. the jboss plugin talks to a JBoss app server over JNP to see if its still alive) - the managed resource avail check is synchronous to the plugin container asking the plugins for availability. Asynchronous avail checks splits that up. The plugin container will call into the plugin, but it doesn't trigger the plugin to talk to the managed resource. The asynchronous thread will periodically talk to the managed resource separate from the plugin container's request.

               

              So, while  the avail check is across all resources and is every 5 minutes by default, the async avail checking can be told "only check this JBossAS server every 1 hour" and it will. For every 5 minutes within that hour, the plugin avail check is very fast - it just returns the last known availability since the previous 1 hour avail check. Only when that 1 hour is up will the plugin actually reach out to the  JBossAS server and try to determine its true availability.

               

              In the end, remember, the plugin has to implement the asynchronous avail checking. And only a few today do so. The JBoss plugins DO use this async checking (go to their plugin configuration settings and you should see it - this was a new feature, it wasn't in, say, Jopr 2.3 I don't think).  Most others do not - in those cases, you are restrictured to really checking avail as defined by rhq.agent.plugins.availability-scan.period-secs.

               

              Hopefully this makes some sense.

              1 of 1 people found this helpful
              • 4. Re: Availability interval time
                W. de Heiden Newbie

                "the async avail checking can be told "only check this JBossAS server every 1 hour" and it will."

                 

                This looks very promissing! But; I tried to find this async check option. At https://jira.jboss.org/jira/browse/JOPR-384 "if you set the avail check period, you are essentially turning on async avail checking" is mentioned. However, I cannot find this obvious nifty feature....