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?
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.
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
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?
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.