You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
I want to create a new template in zabbix with the zabbix_template.present state. Copying and running a simplified example results in an error.
Setup
# cat zabix/create_template.sls
zabbix-template-present:
zabbix_template.present:
- name: Testing Template
# Do not touch existing assigned hosts
# True will detach all other hosts than defined here
- static_host_list: False
- params:
description: Test Template
groups:
# groups must already exist
# template must be at least in one hostgroup
- groupid:
query_object: hostgroup
query_name: Templates
and running this state results in:
# salt 'myhost' state.apply zabbix.create_template debug=true
myhost:
----------
ID: zabbix-template-present
Function: zabbix_template.present
Name: Testing Template
Result: False
Comment: An exception occurred in this state: Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/salt/state.py", line 2154, in call
*cdata["args"], **cdata["kwargs"]
File "/usr/lib/python3.7/site-packages/salt/loader.py", line 2087, in wrapper
return f(*args, **kwargs)
File "/usr/lib64/python3.7/site-packages/salt/states/zabbix_template.py", line 798, in present
component, template_id, **kwargs
File "/usr/lib64/python3.7/site-packages/salt/states/zabbix_template.py", line 329, in _get_existing_template_c_list
c_def["qtype"] + ".get", q_params, **kwargs
File "/usr/lib64/python3.7/site-packages/salt/modules/zabbix.py", line 2558, in run_query
ret = _query(method, params, conn_args["url"], conn_args["auth"])
File "/usr/lib64/python3.7/site-packages/salt/modules/zabbix.py", line 187, in _query
ret["error"]["message"], ret["error"]["data"]
salt.exceptions.SaltException: Zabbix API: Invalid params. (Incorrect API "templatescreen".)
Steps to Reproduce the behavior
Zabbix 5.2
setup this state and run it.
Expected behavior
Should create the template without throwing an error.
Screenshots
Debug output see above.
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
# salt --versions-report
Salt Version:
Salt: 3001.6
Dependency Versions:
cffi: 1.14.0
cherrypy: Not Installed
dateutil: 2.8.1
docker-py: Not Installed
gitdb: 4.0.5
gitpython: 3.1.8
Jinja2: 2.11.2
libgit2: 1.0.1
M2Crypto: 0.36.0
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 1.0.0
mysql-python: Not Installed
pycparser: 2.20
pycrypto: 3.9.8
pycryptodome: 3.9.8
pygit2: 1.3.0
Python: 3.7.9 (default, Nov 3 2020, 12:10:17)
python-gnupg: 0.4.6
PyYAML: 5.3.1
PyZMQ: 19.0.1
smmap: 3.0.4
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.3.3
System Versions:
dist: gentoo 2.7
locale: UTF-8
machine: x86_64
release: 4.9.74-grsecurity
system: Linux
version: Gentoo 2.7
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Description
I want to create a new template in zabbix with the zabbix_template.present state. Copying and running a simplified example results in an error.
Setup
and running this state results in:
Steps to Reproduce the behavior
Zabbix 5.2
setup this state and run it.
Expected behavior
Should create the template without throwing an error.
Screenshots
Debug output see above.
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: