LoginSignup
0
0

More than 3 years have passed since last update.

"<Template>"にID""を持つアプリケーションは使用できません。

Last updated at Posted at 2020-06-30

はじめに

ZABBIX のテンプレートインポート時に、タイトルのようなエラーメッセージで失敗したことはありませんか?
ちなみに英語ですと "Application with ID "" is not available on <Template>" と表示されます。

解決例

ZABBIX のテンプレート(公式ページ) は xml 形式になっていますが、item や discovery_rule > item_prototypes > item_prototype 要素内の application 指定が zabbix_export > templates > template > applications 要素の中に定義されていない場合に発生しました。

wrong-tmpl.xml
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
    <version>3.2</version>
    <date>2015-12-10T03:00:00Z</date>
    <groups>
        <group>
            <name>Templates</name>
        </group>
    </groups>
    <templates>
        <template>
            (略)
            <applications>
                <application>
                    <name>General</name>
                </application>
                <application>
                    <name>Train simulator game</name>
                </application>
                <application>
                    <name>Automobile simulator game</name>
                </application>
                <application>
                    <name>Vessel simulator game</name>
                </application>
            </applications>
            <items>
                <item>
                    <name>The name of a monitored item</name>
            (略)
                    <applications>
                        <application>
                            <name>Flight simulator game</name> <!-- 上の applications の定義にない! -->
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                </item>
            (略)
        </template>
    </templates>
</zabbix_export>

余談

メッセージ中 ID "" の二重引用符のなかに定義を忘れた item 側指定の application の中身を表示してもらえると、悩まずにすぐ理解できたのですがね...

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0