opnsense / opnsense/plugins

Monit Syntax error with Polling Time Integer value

Open
#5,634 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

support
Dominant language
PHP
Stars
1.2k
Forks
863
Avg merge
2d 6h
Merged PRs (30d)
10

Description

Describe the bug
Poll Time integer within Service Settings creates a configuration syntax error

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Services > Monit > Settings > Service Settings'
  2. Click on 'Edit' for a rule
  3. Click on 'Advanced mode'
  4. Scroll down to 'Poll Time'
  5. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.