Monit: poll time validation rejects "/", blocking the cron step syntax recommended by Monit 6
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 79/100
Research direction
Read src/opnsense/mvc/app/models/OPNsense/Monit/Monit.xml and inspect the polltime validation mask. The report says allowing "/" lets the cron step expression */3 * * * * save and produces valid monitrc output; start by checking the existing validation and the generated configuration. Done means the expression is accepted and the local checks described in the issue pass.
Written by the indexing model from the issue text.
Description
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
- I have read the contributing guidelines at https://github.com/opnsense/core/blob/master/CONTRIBUTING.md
- I am convinced that my issue is new after having checked both open and closed issues at https://github.com/opnsense/core/issues?q=is%3Aissue
- AI tools were used to create at least part of the text submitted herewith.
If AI was used, please disclose:
- Model used: Mistral Vibe Code GLM-5.3 (Mistral Hosted)
- Extent of AI involvement: AI tools were used to draft and research this report; the reporter reviewed and validated the content, local testing was performed by the reporter.
Describe the bug
The "Poll time" field of the Monit service dialog rejects the "/" character,
so cron step expressions such as */3 * * * * cannot be entered. Monit 6.0.0
deprecates "every N cycles" in favour of cron-style schedules, so the
recommended migration syntax is currently impossible to configure from the GUI.
To Reproduce
- Services > Monit > Configuration > Services, edit a service
- Enable advanced mode, scroll to "Poll time"
- Enter */3 * * * *
- Save -> error: "Should be a string between 1 and 255 characters. Allowed
characters are letters and numbers as well as asterisk, hyphen, comma and space."
Expected behavior
The cron step syntax recommended by Monit 6 should be accepted, since the
monitrc backend already passes cron-style values through correctly
(e.g. every "15-17 4 * * 1").
Environment
- OPNsense 26.7.x, Monit 6.0.0 (bundled since 26.7.3)
- Affected field: polltime in src/opnsense/mvc/app/models/OPNsense/Monit/Monit.xml,
mask /^([0-9a-zA-Z*-, ]){1,255}$/u - Restriction predates Monit 6, but its impact starts with the "every N cycles"
deprecation in Monit 6.0.0
Local verification
Extending the mask to allow "/" permits entering */3 * * * ; the generated
monitrc contains every "/3 * * * *", monit -t passes and the
"every N cycles" deprecation warnings disappear. Alerting behaviour unchanged.
Ref: opnsense/plugins#4468 (same validation message, filed while Monit was
still a plugin)
Environment
Software version used and hardware type if relevant, e.g.:
OPNsense 23.7.7 (amd64).
Deciso DEC750
- Dominant language
- PHP
- Stars
- 4.7k
- Forks
- 1k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 22
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from opnsense/core
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 60/100
Maintainers usually reply within 1 day
-
support
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
Monit: port/username/SSL only used for the last mail server when more than one is setPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
support
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
opnsense/core#10976 · 4 comments ·
Maintainers usually reply within 1 day
Similar issues
-
Awaiting Triage
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 1 day
-
tui: PHP code blocks without `<?php` are not syntax highlightedPossibly taken A pull request linked to this issue is open or already merged. Openreproduced
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
anomalyco/opencode#58664 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 87/100
WordPress/phpunit-test-runner#364 ·
Maintainers usually reply within 4 days
-
domain/framework Platform(Default) priority/high
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days