Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New zabbix_service module #58926

Merged
merged 6 commits into from
Dec 18, 2019
Merged

New zabbix_service module #58926

merged 6 commits into from
Dec 18, 2019

Conversation

emriver
Copy link
Contributor

@emriver emriver commented Jul 10, 2019

SUMMARY

New module to manage Zabbix services.

ISSUE TYPE
  • New Module Pull Request
COMPONENT NAME

zabbix_service

ADDITIONAL INFORMATION

Tested on Zabbix 4.0.


* new module zabbix_service

* fix type

* fix githubid
* new zabbix service module
@ansibot
Copy link
Contributor

ansibot commented Jul 10, 2019

The test ansible-test sanity --test validate-modules [explain] failed with 5 errors:

lib/ansible/modules/monitoring/zabbix/zabbix_service.py:0:0: E324 Argument 'algorithm' in argument_spec defines default as ('one_child') but documentation defines default as (None)
lib/ansible/modules/monitoring/zabbix/zabbix_service.py:0:0: E324 Argument 'calculate_sla' in argument_spec defines default as (True) but documentation defines default as (False)
lib/ansible/modules/monitoring/zabbix/zabbix_service.py:0:0: E326 Argument 'algorithm' in argument_spec defines choices as (['no', 'one_child', 'all_childs']) but documentation defines choices as (['False', 'one_child', 'all_childs'])
lib/ansible/modules/monitoring/zabbix/zabbix_service.py:0:0: E338 Argument 'state' in argument_spec uses default type ('str') but documentation doesn't define type
lib/ansible/modules/monitoring/zabbix/zabbix_service.py:123:1: E313 RETURN is not valid YAML

The test ansible-test sanity --test yamllint [explain] failed with 1 error:

lib/ansible/modules/monitoring/zabbix/zabbix_service.py:123:1: error RETURN: syntax error: expected ',' or '}', but got '<stream end>'

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Jul 10, 2019

@ansibot ansibot added affects_2.9 This issue/PR affects Ansible v2.9 ci_verified Changes made in this PR are causing tests to fail. module This issue/PR relates to a module. monitoring Monitoring category needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. needs_triage Needs a first human triage before being processed. new_contributor This PR is the first contribution by a new community member. new_module This PR includes a new module. new_plugin This PR includes a new plugin. support:community This issue/PR relates to code supported by the Ansible community. zabbix Zabbix community labels Jul 10, 2019
@ansibot ansibot removed the ci_verified Changes made in this PR are causing tests to fail. label Jul 10, 2019
@ansibot
Copy link
Contributor

ansibot commented Jul 10, 2019

@Akint @D3DeFi @K-dot @RedWhiteMiko @abulimov @akomic @cove @dj-wasabi @eikef @harrisongu @logan2211 @rubentsirunyan @sookido

As a maintainer of a module in the same namespace this new module has been submitted to, your vote counts for shipits. Please review this module and add shipit if you would like to see it merged.

click here for bot help

@ansibot ansibot added community_review In order to be merged, this PR must follow the community review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Jul 10, 2019
Copy link
Contributor

@D3DeFi D3DeFi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested against Zbx 3.0, 4.0 and 4.2. Works good. Only minor adjustements required.

Btw, do you plan to extend this module to support Service time and service dependencies as well?

- Algorithm used to calculate the sla
required: false
type: str
choices: ["no", "one_child", "all_childs"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for being neat-picky, but plural of child is children. Can you change this please? :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also it is ideal not to refer to zabbix API documentation very much in module docs, it would be nice if you can add some notes about these choices (["no", "one_child", "all_childs"]) in algorithm description.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your review, I have applied your recommendations :)

@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed community_review In order to be merged, this PR must follow the community review workflow. needs_triage Needs a first human triage before being processed. labels Jul 11, 2019
@emriver
Copy link
Contributor Author

emriver commented Jul 11, 2019

Btw, do you plan to extend this module to support Service time and service dependencies as well?

It is a good idea, but I won't have any time to implement this in the next future.

@D3DeFi
Copy link
Contributor

D3DeFi commented Jul 11, 2019

Btw, do you plan to extend this module to support Service time and service dependencies as well?

It is a good idea, but I won't have any time to implement this in the next future.

NP, maybe some day you, me or someone else will find a way to contribute this as a feature :)

Copy link
Contributor

@D3DeFi D3DeFi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work. Tested this
-label needs_triage
shipit

@ansibot ansibot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Jul 11, 2019
@ansibot ansibot added the community_review In order to be merged, this PR must follow the community review workflow. label Jul 11, 2019
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Jul 19, 2019
Co-Authored-By: sky-joker <megane@kurobuti.com>
@ansibot ansibot removed the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Oct 11, 2019
Copy link
Contributor

@D3DeFi D3DeFi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @rubentsirunyan

shipit

Copy link
Contributor

@rubentsirunyan rubentsirunyan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looked through the code.
shipit

@ansibot ansibot added shipit This PR is ready to be merged by Core and removed community_review In order to be merged, this PR must follow the community review workflow. labels Oct 19, 2019
Copy link
Contributor

@resmo resmo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as #58051, please reimplement the state=dump into a dedicated info module

@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed shipit This PR is ready to be merged by Core labels Oct 19, 2019
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Oct 27, 2019
@ansibot ansibot removed the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Dec 10, 2019
Copy link
Contributor

@D3DeFi D3DeFi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@D3DeFi
Copy link
Contributor

D3DeFi commented Dec 13, 2019

@resmo is this good to go now?

@ansibot
Copy link
Contributor

ansibot commented Dec 13, 2019

Copy link
Contributor

@resmo resmo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

As a feature request, I would have returned the json of the api response: e.g. the json of the zabbix service created, or the json of the zabbix server deleted. But merge this and work towards.

@ansibot ansibot added shipit This PR is ready to be merged by Core and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Dec 16, 2019
@resmo resmo merged commit 848782a into ansible:devel Dec 18, 2019
@ansible ansible locked and limited conversation to collaborators Jan 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.9 This issue/PR affects Ansible v2.9 module This issue/PR relates to a module. monitoring Monitoring category new_contributor This PR is the first contribution by a new community member. new_module This PR includes a new module. new_plugin This PR includes a new plugin. shipit This PR is ready to be merged by Core support:community This issue/PR relates to code supported by the Ansible community. zabbix Zabbix community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants