Skip to content
This repository has been archived by the owner on Nov 29, 2021. It is now read-only.

Commit

Permalink
Merge pull request #400 from Kraemii/setting-for-mqtt
Browse files Browse the repository at this point in the history
Added option to enable mqtt
  • Loading branch information
ArnoStiefvater committed Jun 15, 2021
2 parents cd60fb4 + 9b28ce5 commit 9e43939
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Add method to validate port lists.
[#393](https://github.com/greenbone/ospd/pull/393)
[#395](https://github.com/greenbone/ospd/pull/395)
- Add option to set MQTT Broker [#400](https://github.com/greenbone/ospd/pull/400)

### Changed
- Set Log Timestamp to UTC. [#394](https://github.com/greenbone/ospd-openvas/pull/394)
Expand Down
9 changes: 9 additions & 0 deletions ospd/parser.py
Expand Up @@ -40,6 +40,7 @@
DEFAULT_MAX_SCAN = 0 # 0 = disable
DEFAULT_MIN_FREE_MEM_SCAN_QUEUE = 0 # 0 = Disable
DEFAULT_MAX_QUEUED_SCANS = 0 # 0 = Disable
DEFAULT_MQTT = None # "" = Disable MQTT

ParserType = argparse.ArgumentParser
Arguments = argparse.Namespace
Expand Down Expand Up @@ -189,6 +190,14 @@ def __init__(self, description: str) -> None:
'starting to reject new scans. '
'Default %(default)s, disabled',
)
parser.add_argument(
'--mqtt',
default=DEFAULT_MQTT,
type=str,
help='Sets the hostname or IP address of the remote broker. '
'If not set, redis is used instead.'
'Default %(default)s, disabled',
)

self.parser = parser

Expand Down

0 comments on commit 9e43939

Please sign in to comment.