Repository navigation
Enhance Kapacitor module and state. - #46294
Conversation
rallytime
left a comment
There was a problem hiding this comment.
Hi @aabouzaid - I have a couple of requests and one question on this change. Thanks!
| def define_task(name, | ||
| tick_script, | ||
| task_type='stream', | ||
| dbrps=None, |
There was a problem hiding this comment.
Can you move this new kwarg to the end of the list? We don't want to change the API unnecessarily here.
| def task_present(name, | ||
| tick_script, | ||
| task_type='stream', | ||
| dbrps=None, |
There was a problem hiding this comment.
Same comment here as above.
| A list of databases and retention policies in "dbname"."rpname" format | ||
| to fetch data from. For backward compatibility, the value of | ||
| 'database' and 'retention_policy' will be merged as part of dbrps. | ||
|
|
There was a problem hiding this comment.
Can you add a .. versionadded:: Fluorine tag to these docs (and do the same for the docs in the module)?
There was a problem hiding this comment.
Sure, but how I can add it for mixed sections like this:
'''
Kapacitor state module.
:configuration: This module accepts connection configuration details either as
parameters or as configuration settings in /etc/salt/minion on the relevant
minions::
kapacitor.unsafe_ssl: 'false'
kapacitor.protocol: 'http'
kapacitor.host: 'localhost'
kapacitor.port: 9092
This data can also be passed into pillar. Options passed into opts will
overwrite options passed into pillar.
.. versionadded:: 2016.11.0
'''
Since kapacitor.unsafe_ssl and kapacitor.protocol are new, but rest are old (2016.11.0)
There was a problem hiding this comment.
Good question. I think you can put that in the configuration block, indented. But I am not sure on what the formatting will look like. It might just be prudent to add a comment in that configuration block stating that those options are new to Fluorine.
|
|
||
| task = __salt__['kapacitor.get_task'](name) | ||
| old_script = task['script'] if task else '' | ||
| task_dbrps = [{'db': dbrp[0], 'rp': dbrp[1]} for dbrp in (dbrp.split('.') for dbrp in dbrps)] |
There was a problem hiding this comment.
How does this change things for people specifying database and retention_policy and not dbrps? It seems like this would change the default behavior.
| .. versionadded:: Fluorine | ||
|
|
||
| database | ||
| Which database to fetch data from. Defaults to None, which will use the |
There was a problem hiding this comment.
database
Which database to fetch data from. Defaults to None, which will use the
default database in InfluxDB.
@rallytime btw, I believe this (allow empty database) has never been "really" true, it has been changed on 28.10.2015 which means that happened even before the major change in v0.13.
Therefore, I will change this too.
What does this PR do?
Current Kapacitor module and state are missing some functionality.
This PR has following:
kapacitorddoesn't listen tolocalhost).httpsand usehttpby default.-skipVerifyoption to allow "Unsafe SSL".Tests written?
Yes
Commits signed with GPG?
Yes