1 2 3 Previous Next 31 Replies Latest reply on Feb 20, 2009 12:20 PM by iradix

    No Metric Data Available?

    iradix

      I've just started playing around with jopr, so I wouldn't be surprised if this is a rookie mistake, but I've got jopr server 2.1.0.GA installed on an os x test machine, and I've got a jopr agent 2.1.0.GA installed on that same machine as well. The agent properly registers, I can add it to my inventory and I can add the JBoss AS instance also running on that box to the inventory, so it seems that server and agent are communicating fine. The problem is that while I can see data collection on traits like architecture, host name, etc, all the graphs show "No Metric Data Available". The configure tab under monitor shows that collection is enabled for CPU and memory statistics, but they aren't showing up, and I see the same behavior with JBoss AS performance data as well. Am I missing something?

        • 1. Re: No Metric Data Available?
          mazz

          The basic answer would be "did you wait long enough for the collection interval?"

          Each metric is collected on a custom-defined "collection interval". Many of the defaults are 10 minutes or even 20 minutes (you can change these if you want faster collections - the minimum allowed is 30 seconds).

          If you did wait long enough, and you still see "No Metric Data Available", the next most common cause is your "Metric Display Range" is set to some time in the past. Look at the time frame specified at the bottom (the default is something like "the last 8 hours"). If you changed this to some time frame in the past, before measurements were collected, you will see empty data graphs.

          Lastly, if your server and agent are on different boxes, you must ensure your machines have their clocks synced (via ntp or some other sync mechanism). Since you say you are all running on the same MacOS box, this isn't your error.

          If you still can't see any data after checking all of these, look in your agent and server logs for any error messages - post any error messages you see so we can try to figure out the problem.

          • 2. Re: No Metric Data Available?
            iradix

            Thanks for the quick reply. I think in part you nailed it with your basic answer. I hadn't waited long enough for the JBoss AS stats to be collected and when the CPU and other machine level info wasn't collected I assumed that was happening throughout. It seem the application server info is getting collected now however, just not the system information. I think it's possible that this is to blame:

            sending> native
            The native system is NOT available on this agent platform.
            The native system is currently enabled.
            The native system is NOT initialized.


            Can I take that to mean that native collection is not supported on os x?



            • 3. Re: No Metric Data Available?
              mazz

              that is quite possible. Alot of the platform level stats (CPU stats for example) are collected by the native layer. If the native layer is disabled for whatever reason, those stats are not collected.

              "The native system is NOT available on this agent platform." tells me that yes your platform is not supported.

              What hardware are you using? Heiko uses a Mac and has no problems with the native layer - but I don't know what hardware he has. I know other folks have used MacOS in the past. The JNI library (named SIGAR) definitely might not be supported on your Mac hardware, though - so let us know what you have and we can confirm.

              • 4. Re: No Metric Data Available?
                iradix

                It's a pre-unibody Macbook Pro, Intel Core 2 duo running os x 10.5.6. It's not a major issue for me if there isn't much support for Macs as I intend to use jopr to monitor linux boxes, it just means i've got to set up a different test environment. I've got to say, so far I'm impressed. After spending way too much time messing around with OpenNMS recently, I've been very happy with the features jopr provides and how easy it has been to set up, small roadblocks aside.

                • 5. Re: No Metric Data Available?
                  pilhuhn

                  Hi,
                  this is not per-se not supported on Mac - it works well on a Macbook from 2.5 years with a Core Duo cpu.

                  Can you please do the following:

                  $ cd $AGENT/lib
                  $ ls -ls libsigar*mac*
                  $ java -jar sigar.jar
                  sigar> cpuinfo
                  sigar> sysinfo
                  sigar> exit

                  and send attach the output here.

                  Thanks
                  Heiko

                  • 6. Re: No Metric Data Available?
                    iradix

                    Here is is. The one modification I needed to make is that sigar.jar was sigar-1.5.0.3.jar in the lib folder. It does seem to be returning native information though.

                    garfunkel:lib dave$ ls -la libsigar*mac*
                    -rwxr-xr-x@ 1 dave dave 1069464 Apr 16 2008 libsigar-universal-macosx.dylib

                    garfunkel:lib dave$ java -jar sigar-1.5.0.3.jar
                    sigar> cpuinfo
                    2 total CPUs..
                    Vendor........Intel
                    Model.........MacBookPro3,1
                    Mhz...........2400
                    Cache size....4096

                    CPU 0.........
                    User Time.....14.0%
                    Sys Time......8.0%
                    Idle Time.....78.0%
                    Wait Time.....0.0%
                    Nice Time.....0.0%
                    Combined......22.0%

                    CPU 1.........
                    User Time.....16.0%
                    Sys Time......8.0%
                    Idle Time.....76.0%
                    Wait Time.....0.0%
                    --More-- (Page 1 of 2)
                    Nice Time.....0.0%
                    Combined......24.0%

                    Totals........
                    User Time.....14.0%
                    Sys Time......10.0%
                    Idle Time.....76.0%
                    Wait Time.....0.0%
                    Nice Time.....0.0%
                    Combined......24.0%

                    sigar> sysinfo
                    Sigar version.......java=1.5.0.3, native=1.5.0.3
                    Build date..........java=04/16/2008 09:44 AM, native=02/23/2008 12:20 AM
                    Archlib.............libsigar-universal-macosx.dylib
                    Current fqdn........garfunkel.local
                    Current user........dave

                    OS description......Mac OS X Leopard
                    OS name.............MacOSX
                    OS arch.............i386
                    OS machine..........i386
                    OS version..........10.5.6
                    OS patch level......unknown
                    OS vendor...........Apple
                    OS vendor version...10.5
                    OS code name........Leopard
                    OS data model.......32
                    OS cpu endian.......little
                    Java vm version.....1.5.0_16-133
                    Java vm vendor......Apple Inc.
                    Java home.........../System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home
                    10:07 AM up 4 days, 18:14, load average: 1.10, 1.29, 1.39




                    File Systems.........[/, /dev, /dev]

                    Network Interfaces...[lo0, en0, en1, en2, en3, en4]

                    System resource limits:
                    sigar> exit
                    Goodbye.
                    Class Not Found: junit/framework/TestCase
                    Unable to locate: junit.jar

                    • 7. Re: No Metric Data Available?
                      pilhuhn

                      Thanks Dave,
                      Interesting, as this is exactly the same what I see (except for the Model string, Mhz and cache size), so it should be good.

                      Did you by any chance disable native in conf/agent-configuration.xml:

                      entry key="rhq.agent.disable-native-system" value="false"

                      Do you see strange things in the agent.log - relatively shortly after startup?

                      What is the result of doing

                      native --enable at the agent prompt?



                      • 8. Re: No Metric Data Available?
                        iradix

                        No problem Heiko. Thanks for helping out with this.

                        I just stopped and then restarted the agent and didn't see any interesting log messages. I also don't see any when disabling and re-enabling native.

                        I did not explicitly disable native in the conf file, although when I initially started the agent native was disabled. I enabled it from the console which is when I got the status messages I had posted before. Here is what I get when I disable and then re-enable it:

                        sending> sending> native --disable
                        Native system has been disabled.
                        sending> native
                        The native system is NOT available on this agent platform.
                        The native system is currently disabled.
                        The native system is NOT initialized.
                        sending> native --enable
                        Native system has been enabled.
                        sending> native
                        The native system is NOT available on this agent platform.
                        The native system is currently enabled.
                        The native system is NOT initialized.



                        • 9. Re: No Metric Data Available?
                          mazz

                           

                          The native system is NOT available on this agent platform.


                          This is the important message. This tells us the SIGAR jar cannot find the native shared library (the .dylib library).

                          Let's look at the code that loads SIGAR:

                          http://svn.rhq-project.org/repos/rhq/trunk/modules/core/native-system/src/main/java/org/rhq/core/system/SystemInfoFactory.java

                          Look at the static block and the initialize() method. There should be WARN messages in the agent log if bad things happen here. Double check the agent logs and see if you see messages from this SystemInfoFactory object.

                          • 10. Re: No Metric Data Available?
                            mazz

                            BTW: here is the code for the "native" prompt command:

                            http://svn.rhq-project.org/repos/rhq/trunk/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/promptcmd/NativePromptCommand.java

                            You can see it dumps the "NOT available" message when false is returned by SystemInfoFactory.isNativeSystemInfoAvailable().

                            • 11. Re: No Metric Data Available?
                              mazz

                              Edit your agent's conf/log4j.xml so this is in there:

                              <category name="org.rhq.core.system">
                               <priority value="TRACE"/>
                               </category>
                              


                              and make sure the FILE appender allows TRACE:

                              <appender name="FILE" class="org.apache.log4j.RollingFileAppender">
                               <param name="Threshold" value="TRACE"/>
                               <param name="File" value="logs/agent.log"/>
                              ....


                              Run the agent again. See if the strack trace comes out from the static block of that factory class.

                              • 12. Re: No Metric Data Available?
                                iradix

                                Now we're getting somewhere. I don't know how I missed that message before, but with tracing turned on I get:

                                2009-02-18 11:44:53,273 WARN [main] (org.rhq.core.system.SystemInfoFactory)- System
                                info API not accessible on this platform (native shared library not found in java.lib
                                rary.path).
                                2009-02-18 11:44:53,286 TRACE [main] (org.rhq.core.system.SystemInfoFactory)- Stack t
                                race...
                                java.lang.reflect.InvocationTargetException
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
                                39)
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm
                                pl.java:25)
                                at java.lang.reflect.Method.invoke(Method.java:597)
                                at org.rhq.core.system.SystemInfoFactory.invokeApi(SystemInfoFactory.java:274
                                )
                                at org.rhq.core.system.SystemInfoFactory.(SystemInfoFactory.java:69)
                                at org.rhq.core.pc.inventory.InventoryManager.activateResource(InventoryManag
                                er.java:981)
                                at org.rhq.core.pc.inventory.InventoryManager.activateFromDisk(InventoryManag
                                er.java:1135)
                                at org.rhq.core.pc.inventory.InventoryManager.loadFromDisk(InventoryManager.j
                                ava:1161)
                                at org.rhq.core.pc.inventory.InventoryManager.initialize(InventoryManager.jav
                                a:183)
                                at org.rhq.core.pc.PluginContainer.startContainerService(PluginContainer.java
                                :279)
                                at org.rhq.core.pc.PluginContainer.initialize(PluginContainer.java:214)
                                at org.rhq.enterprise.agent.AgentMain.startPluginContainer(AgentMain.java:140
                                9)
                                at org.rhq.enterprise.agent.AgentMain.start(AgentMain.java:493)
                                at org.rhq.enterprise.agent.AgentMain.main(AgentMain.java:347)
                                Caused by: org.hyperic.sigar.SigarException: /Applications/jopr/jopr-agent-2.1.0.GA/l
                                ib/libsigar-universal-macosx.dylib:
                                at org.hyperic.sigar.Sigar.load(Sigar.java:140)
                                ... 15 more

                                So it looks like there is some problem loading the sigar library, even though it does exist in that location and has r-x permissions for everyone.

                                • 13. Re: No Metric Data Available?
                                  mazz

                                  I don't know why kind of tracing SIGAR outputs, turn on TRACE for the "com" and "org" category in log4j.xml and restart the agent. Be prepared for a deluge of log messages in your log file :) You might have to increase the filesize/filecount settings for the file appender so it captures the messages up until the time SIGAR is trying to load the library.

                                  • 14. Re: No Metric Data Available?
                                    mazz

                                    from last post: "why kind" == what kind

                                    Also, you might have to trace on the "net" category too, in addition to com and org.

                                    1 2 3 Previous Next