Pandora FMS Community

Pandora 7 create new local module

scostopos · 25 may 2017, 11:56 · 7 mensajes · 72 visitas

  1. Inicio del debate

    Dear All When i am trying to create a new local module for example a simple one to check local backup files module_begin module_name LastBackup_Timestamp module_type generic_data module_exec expr `date +%s` - `ls -la --time-style=+%s /var/backup/lastbackup| awk '{ print $6 }'` module_end It doesnt appear in the Pandora FMS Server as a module of the Server i monitor There is no error in any of the linux servers A second problem i have is that i can not auto update the module as it is grey the page

  2. Hello scostopos, Can you attach a screenshot of the output you receive on your Linux servers when executing that command? Kind regards, Antonio.

  3. Find bellow the output with a small change in the spript root@ip-172-31-26-5:/var/spool/pandora/data_out# ls -al --time-style=+%D /var/backups/postgres/daily/bcmfort_production| grep $(date +%D) drwxr-xr-x 2 root root 4096 05/25/17 . -rw-r--r-- 1 root root 133656 05/25/17 bcmfort_production_2017-05-25.Thursday.sql.bz2 what we want is to get true if we have a backup been taken today and false if not

  4. Hello scostopos, The module doesn't initialize because you set type "generic_data", and that's only for numeric outputs. If your command is retrieving such alphanumerical info you should use "generic_data_string" as module type, and you'd be able to see the output of your command. However, if you want to only see "true" or "false" you should think on modifying you command to get that result. Fior example using only "ls -l" instead of "ls -al", and adding a "wc -l" at the end of it, so it counts the number of files that match with your specifications, it should retrieve 0 if there are no backups, and 1 if there are one there. Kind regards, Antonio.

  5. Thank you for your comments I made the change but if still do not show up in the Pandora FMS console what we should do about that ?

  6. Hello scostopos, Delete the module and create it again correctly, then restart the agent's service. Always check the output from command line, before configuring the module_type. Kind regards, Antonio.

  7. i did that but unfortunately no luck I even copy - paste a previous module and change the module_name but didnt show up root@ip-172-31-26-5:/var/spool/pandora/data_out# /etc/init.d/pandora_agent_daemon restart Stopping Pandora Agent. Pandora FMS Agent is now running with PID 10834 root@ip-172-31-26-5:/var/spool/pandora/data_out# ls -l --time-style=+%D /var/backups/postgres/daily/bcmfort_production | grep $(date +%D) | wc -l 1 root@ip-172-31-26-5:/var/spool/pandora/data_out#


    It now been fixed i totally delete the conf and recreated


    Can you please also help me with the update Manager online When i click on it . it does show that i have update but the page is grey and i can not press anything on that page

Entra en tu cuenta para publicar.