MogiePete / zabbix-systemd-service-monitoring

Simple Zabbix Template to discover, monitor, and alert on systemd services.
GNU General Public License v2.0
91 stars 41 forks source link

jinja2.exceptions.TemplateSyntaxError: Missing end of comment tag #19

Closed thangaraj-26 closed 4 years ago

thangaraj-26 commented 4 years ago

Due to #SERVICE in zbx_service_discovery.sh i am getting following error.

jinja2.exceptions.TemplateSyntaxError: Missing end of comment tag

can we keep {SERVICE} instead of {#SERVICE} while making same changes in corresponding xml(Template) file.

MogiePete commented 4 years ago

Service is the variable used by Zabbix. Removing the # would break the way Zabbix works.

See the snippet it from the template.

                        <item_prototype>
                            <name>{#SERVICE} Restart</name>
                            <type>0</type>
                            <snmp_community/>
                            <snmp_oid/>
                            <key>systemd.service.restart[{#SERVICE}]</key>