Quantcast
Channel: VMware Communities : Popular Discussions - Hyperic User Forums
Viewing all articles
Browse latest Browse all 52618

Troubleshooting minimal script plugin

$
0
0
I'm trying to get started writing a simple script plugin. I have the following plugin definition in /home/hyperic/agent-4.4.0/bundles/agent-4.4.0-1509/pdk/plugins/test-plugin.xml:

<?xml version="1.0"?>
<plugin>
    <script name="hq-test-stats"><![CDATA[
echo Availability=1
]]></script>

    <server name="Test">
        <metric name="Availability" template="exec:file=pdk/work/scripts/test/hq-test-stats"/>
    </server>
</plugin>


When I test running the metrics, I get no metric output. What do I need to change to get the availability metric?

$ /usr/local/java/bin/java -jar /home/hyperic/agent-4.4.0/bundles/agent-4.4.0-1509/pdk/lib/hq-product.jar -Dplugins.include=test -m metric -Dlog=debug
DEBUG [main] [ProductProperties] Found version.properties via jar:file:/home/hyperic/agent-4.4.0/bundles/agent-4.4.0-1509/pdk/lib/hq-product.jar!/version.properties
DEBUG [main] [ProductProperties] Found version.properties via jar:file:/home/hyperic/agent-4.4.0/bundles/agent-4.4.0-1509/pdk/lib/hq-product.jar!/version.properties
DEBUG [main] [ProductProperties] Found product.properties via jar:file:/home/hyperic/agent-4.4.0/bundles/agent-4.4.0-1509/pdk/lib/hq-product.jar!/product.properties
DEBUG [main] [ProductProperties] Found product.properties via jar:file:/home/hyperic/agent-4.4.0/bundles/agent-4.4.0-1509/pdk/lib/hq-product.jar!/product.properties
INFO  [main] [ProductPluginManager] agent.pdkDir=/home/hyperic/agent-4.4.0/bundles/agent-4.4.0-1509/pdk
INFO  [main] [ProductPluginManager] agent.pdkPluginDir=/home/hyperic/agent-4.4.0/bundles/agent-4.4.0-1509/pdk/plugins
INFO  [main] [ProductPluginManager] agent.pdkWorkDir=/home/hyperic/agent-4.4.0/bundles/agent-4.4.0-1509/pdk/work
DEBUG [main] [ProductPluginManager] Initializing in client mode (pdk=/home/hyperic/agent-4.4.0/bundles/agent-4.4.0-1509/pdk)
DEBUG [main] [MIBTree] No MIBs in directory: /home/hyperic/agent-4.4.0/bundles/agent-4.4.0-1509/pdk/mibs
INFO  [main] [ProductPluginManager] Loading plugin: system-plugin.jar
DEBUG [main] [ProductPluginManager]
--- Manifest entries for: jar:file:/home/hyperic/agent-4.4.0/bundles/agent-4.4.0-1509/pdk/plugins/system-plugin.jar!/ ---
Implementation-Title - system
Implementation-Version - 4.4.0-1509
Specification-Vendor - VMware Inc.
Manifest-Version - 1.0
Created-By - 1.5.0_12-b04 (Sun Microsystems Inc.)
Build-Host - hotdamn.intranet.hyperic.net
Build-Date - Wed Jul 28 14:15:48 PDT 2010
Implementation-Vendor - VMware Inc.
Ant-Version - Apache Ant 1.7.0
Build-Type - Release Build
Build-Owner - bob
Specification-Title - HQ Plugin
Specification-Version - 4.4.0-1509

DEBUG [main] [PluginData] etc/plugin.properties => null
DEBUG [main] [PluginData] etc/hq-plugin.xml => jar:file:/home/hyperic/agent-4.4.0/bundles/agent-4.4.0-1509/pdk/plugins/system-plugin.jar!/etc/hq-plugin.xml
DEBUG [main] [SystemPlugin] sigar.mirror.procnet=null
INFO  [main] [ProductPluginManager] Loading plugin: sqlquery-plugin.jar
DEBUG [main] [ProductPluginManager]
--- Manifest entries for: jar:file:/home/hyperic/agent-4.4.0/bundles/agent-4.4.0-1509/pdk/plugins/sqlquery-plugin.jar!/ ---
Implementation-Title - sqlquery
Implementation-Version - 4.4.0-1509
Specification-Vendor - VMware Inc.
Manifest-Version - 1.0
Created-By - 1.5.0_12-b04 (Sun Microsystems Inc.)
Build-Host - hotdamn.intranet.hyperic.net
Build-Date - Wed Jul 28 14:15:51 PDT 2010
Implementation-Vendor - VMware Inc.
Ant-Version - Apache Ant 1.7.0
Build-Type - Release Build
Build-Owner - bob
Specification-Title - HQ Plugin
Specification-Version - 4.4.0-1509

DEBUG [main] [PluginData] etc/plugin.properties => jar:file:/home/hyperic/agent-4.4.0/bundles/agent-4.4.0-1509/pdk/plugins/sqlquery-plugin.jar!/etc/plugin.properties
DEBUG [main] [PluginData] etc/hq-plugin.xml => jar:file:/home/hyperic/agent-4.4.0/bundles/agent-4.4.0-1509/pdk/plugins/sqlquery-plugin.jar!/etc/hq-plugin.xml
DEBUG [main] [PluginLoader] sqlquery-plugin.jar expanding /home/hyperic/agent-4.4.0/bundles/agent-4.4.0-1509/pdk/lib/jdbc...
DEBUG [main] [PluginLoader] sqlquery-plugin.jar += /home/hyperic/agent-4.4.0/bundles/agent-4.4.0-1509/pdk/lib/jdbc/mysql-connector-java-5.1.10-bin.jar
DEBUG [main] [PluginLoader] sqlquery-plugin.jar += /home/hyperic/agent-4.4.0/bundles/agent-4.4.0-1509/pdk/lib/jdbc/postgresql-7.4.3.jar
INFO  [main] [SQLQueryMeasurementPlugin] Registered proxy for domain: sql
INFO  [main] [ProductPluginManager] Loading plugin: netservices-plugin.jar
DEBUG [main] [ProductPluginManager]
--- Manifest entries for: jar:file:/home/hyperic/agent-4.4.0/bundles/agent-4.4.0-1509/pdk/plugins/netservices-plugin.jar!/ ---
Implementation-Title - netservices
Implementation-Version - 4.4.0-1509
Specification-Vendor - VMware Inc.
Manifest-Version - 1.0
Created-By - 1.5.0_12-b04 (Sun Microsystems Inc.)
Build-Host - hotdamn.intranet.hyperic.net
Build-Date - Wed Jul 28 14:15:51 PDT 2010
Implementation-Vendor - VMware Inc.
Ant-Version - Apache Ant 1.7.0
Build-Type - Release Build
Build-Owner - bob
Specification-Title - HQ Plugin
Specification-Version - 4.4.0-1509

DEBUG [main] [PluginData] etc/plugin.properties => null
DEBUG [main] [PluginData] etc/hq-plugin.xml => jar:file:/home/hyperic/agent-4.4.0/bundles/agent-4.4.0-1509/pdk/plugins/netservices-plugin.jar!/etc/hq-plugin.xml
INFO  [main] [MeasurementPlugin] Register TCP Socket proxy for domain: socket
INFO  [main] [MeasurementPlugin] Register HTTP proxy for domain: http
INFO  [main] [MeasurementPlugin] Register HTTP proxy for domain: url.availability
INFO  [main] [MeasurementPlugin] Register FTP proxy for domain: ftp
INFO  [main] [ProductPluginManager] Loading plugin: test-plugin.xml
DEBUG [main] [ProductPluginManager] Manifest retrieval had an exception (continuing): error in opening zip file
DEBUG [main] [ClientPluginDeployer] Unchanged file: /home/hyperic/agent-4.4.0/bundles/agent-4.4.0-1509/pdk/work/scripts/test/hq-test-stats
[/b][b][/b][b]

Viewing all articles
Browse latest Browse all 52618

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>