Giter VIP home page Giter VIP logo

Comments (7)

fbsanchez avatar fbsanchez commented on June 12, 2024 1

Hi, use 5,10,15.... seems its not allowed yet to use wildcards :(

from pandorafms.

JimmyOlano avatar JimmyOlano commented on June 12, 2024

ยกHi!

From official DokuWiki:

https://pandorafms.com/manual/en/documentation/02_installation/05_configuration_agents#module_crontab

You need put command in another line with module_exec, full example:

 module_begin
 module_name crontab_test
 module_type generic_data
 module_exec script.sh
 module_crontab * 12-15 * * 1
 module_end

from pandorafms.

f-alemauro avatar f-alemauro commented on June 12, 2024

Tried but didn't work:

Incorrect cron syntax '*/5 * * * *'. This module (module Database_events) will be executed always

This is the module

module_begin
module_name Database_events
module_type generic_data
module_exec sqlite3 ****etc etc
module_condition > 60 systemctl restart easycounter.service; systemctl restart webinterface.service; systemctl restart nginx.service
module_group Database
module_description Check the presence of line events; returns the number of minutes since last line event. It restarts the service in case of critical condition
module_min_warning 30
module_max_warning 59
module_min_critical 60
module_max_critical 1440
module_max 1440
module_min 0
module_crontab */5 * * * *
module_end

from pandorafms.

JimmyOlano avatar JimmyOlano commented on June 12, 2024

(๐Ÿค” Interesting Sqlite3 example: module_exec sqlite3 temp.db "SELECT abs(random() % 1440);" ).

module_crontab */5 * * * *

Step values are not documented... but default time for agents is 300 seconds, maybe you do not need module_crontab command.

from pandorafms.

f-alemauro avatar f-alemauro commented on June 12, 2024

(๐Ÿค” Interesting Sqlite3 example: module_exec sqlite3 temp.db "SELECT abs(random() % 1440);" ).

๐Ÿ˜

Step values are not documented...

Do you mean I cannot use it?

but default time for agents is 300 seconds, maybe you do not need module_crontab command.

What if my default agent time is 30 seconds but I need this module to run every 300secs?

What I'm trying to achieve is running this module every 5 minutes (regardless the default agent time) from 10am to 12am and from 3pm to 8pm.

from pandorafms.

f-alemauro avatar f-alemauro commented on June 12, 2024

Hi!
Is there any syntax reference for crontab expression in PandoraFMS?

Thanks

from pandorafms.

f-alemauro avatar f-alemauro commented on June 12, 2024

thank you @fbsanchez, I'll stick with the list!

from pandorafms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.