Pandora FMS community forums

Full Version: pandorafms plugin modules
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
what are the programming languages can we use to develop pandorafms plugin modules? i read pandorafms documentation and search module library to find more details and  about plugins and examples, and i found out that perl and shell script used  mainly to writing plugins. could we use python or php (command line) write plugin modules?
If it possible give me some example and guide lines to do it.
Hello Helplakmal

You can use any programming languages that you can execute in pandora_server.

First of all, you must identified if need a server plugin or an agent plugin.
When you use a plugin server, the information will be string or numeric data. The plugin can do anything to extract this data.

When you need an agent plugin you need to extract the information and put into a XML format.
This is an example of XML format:

<module>
<name><![CDATA[udev]]></name>
<type><![CDATA[generic_data]]></type>
<data><![CDATA[1]]></data>
<description>% of usage in this volume</description>
</module>

        # Print module output
        print "<module>\n";
        print "<name><![CDATA[" . $filesystem . "]]></name>\n";
        print "<type><![CDATA[generic_data]]></type>\n";
        print "<data><![CDATA[" . $use . "]]></data>\n";
        print "<description>% of usage in this volume</description>\n";
        print "</module>\n";
}

LInk: http://www.openideas.info/wiki/index.php...nt_Plugins

Regards
now it is clear to me. thank you for the descriptive answer.
I have another question. I tried to insert data to the pandorafms system using xml files like the way that pandorafms software agent doing it. but xml files didn't recognized by pandorafms system. first i create a agent_name.xml file. then i inserted following xml lines to that file.

<agent_data os_name='Network' os_version='5.0dev' agent_name='agent_name' interval='60' timestamp='2013-07-26 10:30:42'>
<module> <name>parameter</name><type>generic_proc</type><data>1</data></module>
</agent_data>

then i inserted "agent_name.xml" file in to /var/spool/pandora/data_in directory manually. but it didn't add to the relevant agent. i restarted pandorafms server and checked it again.it didn't worked. so is there anything wrong in my procedure???

thanks
This is XML format.

Try adding missing parameters and test with it


<?xml version='1.0' encoding='UTF-8'?>
<agent_data description='' group='' os_name='linux' os_version='"CentOS release 6.4 (Final)"' interval='300' version='5.0' timestamp='2013/07/29 23:43:28' agent_name='name' timezone_offset='0' address='X.X.X.X'>


MODULES


</agent_data>

Regards