Pandora FMS Community

Agent Plugin development questions

drmemento · 15 mar 2013, 12:31 · 3 mensajes · 56 visitas

  1. Inicio del debate

    Hi, We recently started implemented Pandora FMS, and had to create some plugins for our inhouse applications.´ I noticed some behvaiour I've tried to google on withou any success, so I'm trying here instead - The output part of my script looks as follows

    def output_parser(result, name):     print 'n '+name+'n generic_data_stringn '+result+'n '+result+'n Status of '+name+' service.n n'

    and it seems to be working. However, when I hover over the green status icon in the, for example, monitor detail view it says "NORMAL: ". I want it to say "NORMAL: ", but I can't seem to get it to work that way. 'Result' in this case either say "NORMAL" or "CRITICAL", depending on the service checks in the script. Also, when I add ![CDATA[ to the output, pandora complains about it being a bad xml. For example

    def output_parser(result, name):     print 'n n n n n n n'

    Another thing is that here I'm using the data type "generic_data_string". I can't seem to find a list with the types availible in Pandora and an explanation of them. Furthermore, I'm also defining the type in the pandora_agent.cfg, for example

    module_begin module_name Ulbridge module_type generic_data_string module_exec /usr/share/pandora_agent/plugins/ul_socket.py -u localhost -p 9998 module_description Ulbridge status module_end

    Is this necessary? Thanks.

  2. You can see a list of modules in : index.php?sec=gmodules&sec2=godmode/modules/module_list administration -> modules -> module list, with its reserved names and internal ID's. Status only can be NORMAL, WARNING or CRITICAL. Additional informacion can be in another "custom" tag like weriuweriowe uroiew uroiew uro Or also, you can put in the description field. Use data to put the value string you have. Hope that helps.

  3. Thank you for your reply. It made me realize that I was (apparently) confused regarding plugins. I generated xml tags in the plugin's output, and at the same I added rows in the pandora_agent.conf defining module_type, description as well. Sending just the status as output from the script, and defining the data type etc. in the configuration file, everything went much better. I guess that things somehow overwrote each other, resulting in no data being sent to the server, and that I should either print everything in the output, or only status using the configuration file for the rest. Thanks.

Entra en tu cuenta para publicar.