vCenter

 View Only
Expand all | Collapse all

Fortimail Plugin

  • 1.  Fortimail Plugin

    Posted May 03, 2011 07:32 AM
    I wrote a plugin for a fortimail device but I get the following error:

    This resource is turned off or has not been configured properly.
    The problem is: Invalid configuration: Error contacting resource: Unable to connect to SNMP Agent (snmp:null null,null)
    Please turn on the server, or fix its Configuration Properties.

    There is network connectivity, and I can do an snmpwalk to the server.

    What is going wrong here? Do I need to include snmp settings (snmpIp, snmpCommunity) in my plugin or use the shared configuration properties?
    How can I test it from the command line with the correct snmpIp?

    Regards, Dieter


    <plugin>
    <platform name="Fortimail">

    <config include="snmp"/>

    <plugin type="measurement"
    class="org.hyperic.hq.product.SNMPMeasurementPlugin"/>

    <property name="template" value="${snmp.template}:${alias}"/>

    <metric name="Availability"
    template="${snmp.template},Avail=true:sysUpTime"
    indicator="true"/>

    <metric name="Uptime"
    alias="sysUpTime"
    category="UTILIZATION"
    units="jiffys"
    defaultOn="true"
    collectionType="static"/>

    <metric name="CPU Utilization"
    alias="fmlSysCpuUsage.0"
    category="UTILIZATION"
    units="percent"
    defaultOn="true"
    collectionType="static"/>

    <metric name="Deferred Mail Queue"
    alias="fmlMailOptionsDeferQueue.0"
    category="UTILIZATION"
    units="percent"
    defaultOn="true"
    collectionType="static"/>

    <metric name="Log Disk Usage"
    alias="fmlSysLogDiskUsage.0"
    category="UTILIZATION"
    units="percent"
    defaultOn="true"
    collectionType="static"/>

    <metric name="Mail Disk Usage"
    alias="fmlSysMailDiskUsage.0"
    category="UTILIZATION"
    units="percent"
    defaultOn="true"
    collectionType="static"/>

    <metric name="Memory Usage"
    alias="fmlSysMemUsage.0"
    category="UTILIZATION"
    units="percent"
    defaultOn="true"
    collectionType="static"/>
    </platform>
    </plugin>


  • 2.  RE: Fortimail Plugin

    Posted May 04, 2011 09:54 AM
    Hi,

    you can test it from the commandline and you have to include the snmp settings for your environment.

    You should run that command locally or from a box where you can do an snmpwalk successfully

    java -jar ./bundles/agent-4.5.1/pdk/lib/hq-product.jar -Dplugins.include=fortimail -m metric -a -Dlog=debug -Dplatform.ip=<IPADDRESS> -Dplatform.name=<FQDN> -Dplatform.fqdn=<FQDN> -DsnmpIp=<IPADDRESS> -DsnmpVersion=v2c -DsnmpCommunity=<COMMUNITY>
    Please let me know how you get on.

    Cheers,
    Mirko


  • 3.  RE: Fortimail Plugin

    Posted May 04, 2011 01:56 PM
    Instead of hq-product.jar in used hq-pdk-4.5.1.2.jar
    The output seems ok (see file output1.txt)


  • 4.  RE: Fortimail Plugin

    Posted May 04, 2011 08:29 PM
    Hi Dieter,

    sorry my bad. hq-product.jar is deprecated. Have your questions been answered ?
    The output looks good indeed.

    Cheers,
    Mirko


  • 5.  RE: Fortimail Plugin

    Posted May 06, 2011 07:51 AM
    Hi Mirko

    Now I know how I can test the plugin, and the test looks good. But wen I try to use it in Hyperic I still get the error: Invalid configuration: Error contacting resource: Unable to connect to SNMP Agent (snmp:null null,null)
    For screenshots see hyperic suppport (SUPPORT-10758)https://jira.hyperic.com/browse/SUPPORT-10758

    Regards, Dieter


  • 6.  RE: Fortimail Plugin

    Posted May 09, 2011 09:31 AM
    This is what I find in the agent.log at the time I configure the plugin. (see file : fortimail.agent.log)


  • 7.  RE: Fortimail Plugin

    Posted May 09, 2011 09:35 AM
    Just to doublecheck, you have set up the Configurations Properties (SNMP version, etc ) of your plugin in the GUI ?

    Mirko


  • 8.  RE: Fortimail Plugin

    Posted May 09, 2011 09:42 AM
    yes I did, see https://jira.hyperic.com/secure/attachment/34975/screenshot-2.jpg
    Is there something wrong with te settings?


  • 9.  RE: Fortimail Plugin

    Posted May 09, 2011 09:45 AM
    Sorry, I can not access your screenshot. As I understand you have already logged a ticket with the support team. I am sure they will resolve your issue.

    Cheers,
    Mirko


  • 10.  RE: Fortimail Plugin

    Posted May 09, 2011 09:55 AM
    I logged a ticket with support but this was the answer:

    Thank you for contacting Hyperic Technical Support. I do understand your interest in this custom plugin, however, this is not something that is within the scope of support. That being said, I'd like to direct you to the forums where there are users that might be able to direct you.

    The issue is now closed.
    I understand that they aren't going to help me writing my plugin. But now my plugin works from the command line, but not in the GUI. Is it better to reopen this issue with support?

    Regards Dieter


  • 11.  RE: Fortimail Plugin

    Posted May 09, 2011 09:56 AM
    OK I see , you might want to attach the screenshot(s) to this thread.

    Cheers,
    Mirko


  • 12.  RE: Fortimail Plugin

    Posted May 09, 2011 10:04 AM
    Here is the screenshot.


  • 13.  RE: Fortimail Plugin

    Posted May 09, 2011 10:18 AM
    Thanks.

    Have you deployed the same version of your plugin on your Agent and on the server ?
    Have you made any modifications to the plugin, after you have created a resource based on it ?
    Could you delete the resource from the inventory and create it again ?

    If the steps above do not work, try the following. I would actually rather do it on a test system
    Delete the plugin on filelevel on Agent and Server or/and rename the plugin filename and change the <platform name="Fortimail"> and deploy it on Agent and Server
    Unfortunately you cannot delete plugins from the inventory list, so you have to rename it.
    Try to create a resource based on the new plugin.

    Cheers,
    Mirko


  • 14.  RE: Fortimail Plugin

    Posted May 11, 2011 06:17 AM
    The plugin works when I change the filename and the platform name.