brennerm / check-mk-web-api

Python library to talk to the Check_Mk Web API
https://brennerm.github.io/check-mk-web-api/
MIT License
53 stars 26 forks source link

add host attributes #20

Closed unclesamwk closed 4 years ago

unclesamwk commented 4 years ago

Hey,

how i can add custom host attributes?

{'hostname': 'myserver123',
 'folder': '',
 'attributes': {'ipaddress': '192.168.0.42',
                'site': 'mysite',
                'parent': 'server01'
                'tag_agaent': 'cmk-agent'}}

greetings sam

brennerm commented 4 years ago

Hey @unclesamwk,

host attributes can be added like so:

# add new
>>> api.add_host('host00', foo='bar')
# edit existing
>>> api.edit_host('host00', foo='bars')
brennerm commented 4 years ago

Closing this for now. Feel free to ask for further support.