5 Replies Latest reply on Apr 4, 2011 12:20 PM by mazz

    How to set the service discovery and measurement scan interv

    Jim Ma Apprentice

      Hi all ,
      I would like to let jopr agent scan the new service and send the measurement data often . I found this entry in agent-configuration.xml and set it to 5 seconds:

      But it seems does not work. The agent does not scan my new added service in 5 seconds . I also want the agent to send the new updated measurement data often , but I can not find the related configuration to enable it .
      Can anyone shed some light on this ? Thanks in advance .

        • 1. Re: How to set the service discovery and measurement scan in
          mazz Master

          There are two types of scans - "server scans" and "service scans".

          A "server scan" detects top-level servers that run on your platform - things like JBossAS servers, Postgres databases and the like. These scans run by default every 15 minutes. The setting that controls this is "rhq.agent.plugins.server-discovery.period-secs".

          A "service scan" detects lower-level and more fine-grained services that are running in already detected and imported top-level servers. Things like EJBs running in JBossAS, tables in a Postgres database or VHosts in Apache. These scans run by default every 24 hours (i.e. 1 day). You must have already imported the servers in inventory before services can be discovered! These types of scans are normally very "expensive" to perform since they do probing inside the managed resource, so we don't do it often (which is why its defaulted to 24 hours). The setting that controls this is "rhq.agent.plugins.service-discovery.period-secs".

          To control how often you collect metrics, you change each individual metric's "collection interval". Go to the resource whose metrics you want to change collection intervals for - specifically go to the Measurement tab. You then go to the subtab "Schedules". This is where you change the collection intervals. If you want to change the intervals for many resources, create a compatible group of the resources whose metrics you want to change and go to the group's Measurement>Schedules tab and change the interval there.

          • 2. Re: How to set the service discovery and measurement scan in
            jay shaughnessy Expert

            And the minimum interval for metric collection is 30 seconds. Note that the more often you collect metrics the heavier the processing demand and back-end storage requirements. So, be judicious in your settings.

            • 3. Re: How to set the service discovery and measurement scan in
              Jim Ma Apprentice

              Thanks for your quick and detailed answer. Now it works like a charm.

              • 4. Re: How to set the service discovery and measurement scan in
                Michael Musgrove Master

                These are reasonable periods for automatic scanning but we should also provide an on demand scan of selected components. For example, in the embedded console if the user selects a node I would have expected a rescan of that node. Not doing so gives the wrong impression to the user.

                • 5. Re: How to set the service discovery and measurement scan in
                  mazz Master

                  Michael Musgrove wrote:

                   

                  These are reasonable periods for automatic scanning but we should also provide an on demand scan of selected components. For example, in the embedded console if the user selects a node I would have expected a rescan of that node. Not doing so gives the wrong impression to the user.

                   

                  Last year, I added the ability to manually ask for a discovery to be performed under a specific resource. See comment #1 in issue 631895. But this is manual - you'd have to go to the agent prompt (if its running in foreground) or you go through the GUI (the agent's Operation tab, using Execute Prompt Command operation).

                   

                  I recently fixed a bug in the plugin container where it failed to detect services that were deep in the resource hierarchy automatically, under a resource that was newly added... see issue 534186.

                   

                  Lastly, the platform itself has an operation "Manual Discovery" that let's you kick off a server/service scan on the entire box (i.e. it forces the agent to run the scans even if their scan intervals aren't up and the agent is not due to run them ). But again, this requires a manual effort (you have to go to the GUI and kick it off).

                   

                  As for the embedded console use-case, I'm not familiar with the embedded console GUI code. But it is possible that that fix for issue 534186 may address your concern, but I don't know, just a guess.