zabbix_usermacro
¶
Management of Zabbix usermacros. :codeauthor: Raymond Kuiper <qix@the-wired.net>
- saltext.zabbix.states.zabbix_usermacro.__virtual__()[source]¶
Only make these states available if Zabbix module is available.
- saltext.zabbix.states.zabbix_usermacro.present(name, value, hostid=None, **kwargs)[source]¶
Creates a new usermacro.
- Parameters:
name – name of the usermacro
value – value of the usermacro
hostid – id’s of the hosts to apply the usermacro on, if missing a global usermacro is assumed.
_connection_user – Optional - zabbix user (can also be set in opts or pillar, see module’s docstring)
_connection_password – Optional - zabbix password (can also be set in opts or pillar, see module’s docstring)
_connection_url – Optional - url of zabbix frontend (can also be set in opts, pillar, see module’s docstring)
override host usermacro: zabbix_usermacro.present: - name: '{$SNMP_COMMUNITY}'' - value: 'public' - hostid: 21
- saltext.zabbix.states.zabbix_usermacro.absent(name, hostid=None, **kwargs)[source]¶
Ensures that the mediatype does not exist, eventually deletes the mediatype.
- Parameters:
name – name of the usermacro
hostid – id’s of the hosts to apply the usermacro on, if missing a global usermacro is assumed.
_connection_user – Optional - zabbix user (can also be set in opts or pillar, see module’s docstring)
_connection_password – Optional - zabbix password (can also be set in opts or pillar, see module’s docstring)
_connection_url – Optional - url of zabbix frontend (can also be set in opts, pillar, see module’s docstring)
delete_usermacro: zabbix_usermacro.absent: - name: '{$SNMP_COMMUNITY}'