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

Maintenance Type? #43

Closed
badbob001 opened this Issue May 17, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@badbob001

badbob001 commented May 17, 2017

When creating a maintenance plan, there is no option to specify the type: either 'with data collection' or 'no data collection'. So the plans are created with the default of 'with data collection', which is undesirable since triggers will still fire, despite being under maintenance.

@badbob001

This comment has been minimized.

badbob001 commented May 17, 2017

I've worked around the issue by editing ~/zabbix-cli/build/lib/zabbix_cli/cli.py and add ",maintenance_type=1,":

        result = self.zapi.maintenance.create(name=maintenance_name,
                                              active_since=since,maintenance_type=1
                                              active_till=till,
                                              description=maintenance_description,
                                              hostids=host_ids,
                                              groupids=hostgroup_ids,
                                              timeperiods=[
                                                  {
                                                      'start_date':since,
                                                      'period':sec,
                                                      'timeperiod_type':0
                                                  }
                                              ])

And then run setup.py install.

When I tried adding the change to a new line, the app failed to run. Probably a issue with tabs.

@ghost ghost assigned rafaelma May 18, 2017

@usit-gd usit-gd added this to the 1.7.0 milestone May 18, 2017

rafaelma added a commit that referenced this issue May 18, 2017

@ghost

This comment has been minimized.

Collaborator

ghost commented May 18, 2017

Hei

You are right, this parameter is important to have. A patch has been commited and this will be available in the next release.

@usit-gd usit-gd closed this May 18, 2017

@usit-gd usit-gd added the Tested label May 19, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment