Monit Syntax error with Polling Time Integer value
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 1.2k
- Forks
- 863
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 10
Description
- I have read the contributing guide lines at https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md
- I have searched the existing issues, open and closed, and I'm convinced that mine is new.
- The title contains the plugin to which this issue belongs
Describe the bug
Poll Time integer within Service Settings creates a configuration syntax error
To Reproduce
Steps to reproduce the behavior:
- Go to 'Services > Monit > Settings > Service Settings'
- Click on 'Edit' for a rule
- Click on 'Advanced mode'
- Scroll down to 'Poll Time'
- Enter an integer
Expected behavior
Config to save without syntax errors
Result
# monit -t -v
Adding 'allow localhost' -- host resolved to [::1]
Adding 'allow localhost' -- host resolved to [::ffff:127.0.0.1]
/usr/local/etc/monitrc:35: invalid every format '"'
/usr/local/etc/monitrc:58: syntax error '"
...
check host xxx address xxx
if failed port 443 protocol https and certificate valid > 20 days then alert
every "'
monit exiting due to parsing errors in the configuration file.
Contributor 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.
Research direction
Start at Services > Monit > Settings > Service Settings, reproduce the issue in Advanced mode by entering an integer in Poll Time, and inspect the generated monitrc output. Run monit -t -v against the resulting configuration; done means the integer is emitted as valid Monit syntax and the configuration saves without parsing errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 56/100