Skip to content

Instantly share code, notes, and snippets.

@TerAnYu
Last active November 11, 2023 00:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save TerAnYu/54db5653552b091366df2f81b99ea2be to your computer and use it in GitHub Desktop.
Save TerAnYu/54db5653552b091366df2f81b99ea2be to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>5.2</version>
<date>2021-09-08T08:38:20Z</date>
<groups>
<group>
<name>SELECTEL</name>
</group>
</groups>
<templates>
<template>
<template>Selectel Billing</template>
<name>Selectel Billing</name>
<description>TerAnYu</description>
<groups>
<group>
<name>SELECTEL</name>
</group>
</groups>
<applications>
<application>
<name>Billing</name>
</application>
</applications>
<items>
<item>
<name>Selectel Discovery Balance</name>
<type>HTTP_AGENT</type>
<key>selectel_balance</key>
<delay>10m</delay>
<history>0</history>
<trends>0</trends>
<value_type>TEXT</value_type>
<description>Баланс для обнаружения данных</description>
<applications>
<application>
<name>Billing</name>
</application>
</applications>
<url>https://api.selectel.ru/v3/billing/balance?with_debt=1&amp;with_prediction=1</url>
<headers>
<header>
<name>X-token</name>
<value>{$TOKEN}</value>
</header>
<header>
<name>Content-Type</name>
<value>application/json</value>
</header>
</headers>
</item>
<item>
<name>Основной баланс - основной бонусный баланс</name>
<type>DEPENDENT</type>
<key>selectel_balance[primary.bonus,{$TOKEN}]</key>
<delay>0</delay>
<history>60d</history>
<units>Руб.</units>
<description>Бонусы — основной бонусный баланс</description>
<applications>
<application>
<name>Billing</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<parameters>
<parameter>$.data.primary.bonus</parameter>
</parameters>
</step>
<step>
<type>MULTIPLIER</type>
<parameters>
<parameter>0.01</parameter>
</parameters>
</step>
</preprocessing>
<master_item>
<key>selectel_balance</key>
</master_item>
</item>
<item>
<name>Основной баланс - основной лицевой счет</name>
<type>DEPENDENT</type>
<key>selectel_balance[primary.main,{$TOKEN}]</key>
<delay>0</delay>
<history>60d</history>
<units>Руб.</units>
<description>Рубли — основной лицевой счет</description>
<applications>
<application>
<name>Billing</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<parameters>
<parameter>$.data.primary.main</parameter>
</parameters>
</step>
<step>
<type>MULTIPLIER</type>
<parameters>
<parameter>0.01</parameter>
</parameters>
</step>
</preprocessing>
<master_item>
<key>selectel_balance</key>
</master_item>
</item>
<item>
<name>Основной баланс - голоса приложения Вконтакте</name>
<type>DEPENDENT</type>
<key>selectel_balance[primary.vk_rub,{$TOKEN}]</key>
<delay>0</delay>
<history>60d</history>
<units>Руб.</units>
<description>Голоса ВКонтакте — голоса приложения Вконтакте</description>
<applications>
<application>
<name>Billing</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<parameters>
<parameter>$.data.primary.vk_rub</parameter>
</parameters>
</step>
<step>
<type>MULTIPLIER</type>
<parameters>
<parameter>0.01</parameter>
</parameters>
</step>
</preprocessing>
<master_item>
<key>selectel_balance</key>
</master_item>
</item>
<item>
<name>Баланс хранилища - основной бонусный баланс</name>
<type>DEPENDENT</type>
<key>selectel_balance[storage.bonus,{$TOKEN}]</key>
<delay>0</delay>
<history>60d</history>
<units>Руб.</units>
<description>Баланс хранилища — Бонусы — основной бонусный баланс</description>
<applications>
<application>
<name>Billing</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<parameters>
<parameter>$.data.storage.bonus</parameter>
</parameters>
</step>
<step>
<type>MULTIPLIER</type>
<parameters>
<parameter>0.01</parameter>
</parameters>
</step>
</preprocessing>
<master_item>
<key>selectel_balance</key>
</master_item>
</item>
<item>
<name>Баланс хранилища - Долг</name>
<type>DEPENDENT</type>
<key>selectel_balance[storage.debt,{$TOKEN}]</key>
<delay>0</delay>
<history>60d</history>
<units>Руб.</units>
<description>Баланс хранилища — Долг</description>
<applications>
<application>
<name>Billing</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<parameters>
<parameter>$.data.storage.debt</parameter>
</parameters>
</step>
<step>
<type>MULTIPLIER</type>
<parameters>
<parameter>0.01</parameter>
</parameters>
</step>
</preprocessing>
<master_item>
<key>selectel_balance</key>
</master_item>
</item>
<item>
<name>Баланс хранилища - основной лицевой счет</name>
<type>DEPENDENT</type>
<key>selectel_balance[storage.main,{$TOKEN}]</key>
<delay>0</delay>
<history>60d</history>
<units>Руб.</units>
<description>Баланс хранилища — основной лицевой счет</description>
<applications>
<application>
<name>Billing</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<parameters>
<parameter>$.data.storage.main</parameter>
</parameters>
</step>
<step>
<type>MULTIPLIER</type>
<parameters>
<parameter>0.01</parameter>
</parameters>
</step>
</preprocessing>
<master_item>
<key>selectel_balance</key>
</master_item>
</item>
<item>
<name>Баланс хранилища - Итого</name>
<type>DEPENDENT</type>
<key>selectel_balance[storage.sum,{$TOKEN}]</key>
<delay>0</delay>
<history>60d</history>
<units>Руб.</units>
<description>Баланс хранилища — Итого</description>
<applications>
<application>
<name>Billing</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<parameters>
<parameter>$.data.storage.sum</parameter>
</parameters>
</step>
<step>
<type>MULTIPLIER</type>
<parameters>
<parameter>0.01</parameter>
</parameters>
</step>
</preprocessing>
<master_item>
<key>selectel_balance</key>
</master_item>
</item>
<item>
<name>Баланс хранилища - голоса приложения Вконтакте</name>
<type>DEPENDENT</type>
<key>selectel_balance[storage.vk_rub,{$TOKEN}]</key>
<delay>0</delay>
<history>60d</history>
<units>Руб.</units>
<description>Баланс хранилища — Голоса ВКонтакте — голоса приложения Вконтакте</description>
<applications>
<application>
<name>Billing</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<parameters>
<parameter>$.data.storage.vk_rub</parameter>
</parameters>
</step>
<step>
<type>MULTIPLIER</type>
<parameters>
<parameter>0.01</parameter>
</parameters>
</step>
</preprocessing>
<master_item>
<key>selectel_balance</key>
</master_item>
</item>
<item>
<name>Баланс vmware - основной бонусный баланс</name>
<type>DEPENDENT</type>
<key>selectel_balance[vmware.bonus,{$TOKEN}]</key>
<delay>0</delay>
<history>60d</history>
<units>Руб.</units>
<description>Баланс vmware — Бонусы — основной бонусный баланс</description>
<applications>
<application>
<name>Billing</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<parameters>
<parameter>$.data.vmware.bonus</parameter>
</parameters>
</step>
<step>
<type>MULTIPLIER</type>
<parameters>
<parameter>0.01</parameter>
</parameters>
</step>
</preprocessing>
<master_item>
<key>selectel_balance</key>
</master_item>
</item>
<item>
<name>Баланс vmware - Долг</name>
<type>DEPENDENT</type>
<key>selectel_balance[vmware.debt,{$TOKEN}]</key>
<delay>0</delay>
<history>60d</history>
<units>Руб.</units>
<description>Баланс vmware — Долг</description>
<applications>
<application>
<name>Billing</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<parameters>
<parameter>$.data.vmware.debt</parameter>
</parameters>
</step>
<step>
<type>MULTIPLIER</type>
<parameters>
<parameter>0.01</parameter>
</parameters>
</step>
</preprocessing>
<master_item>
<key>selectel_balance</key>
</master_item>
</item>
<item>
<name>Баланс vmware - основной лицевой счет</name>
<type>DEPENDENT</type>
<key>selectel_balance[vmware.main,{$TOKEN}]</key>
<delay>0</delay>
<history>60d</history>
<units>Руб.</units>
<description>Баланс vmware — основной лицевой счет</description>
<applications>
<application>
<name>Billing</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<parameters>
<parameter>$.data.vmware.main</parameter>
</parameters>
</step>
<step>
<type>MULTIPLIER</type>
<parameters>
<parameter>0.01</parameter>
</parameters>
</step>
</preprocessing>
<master_item>
<key>selectel_balance</key>
</master_item>
</item>
<item>
<name>Баланс vmware - часов до блокировки</name>
<type>DEPENDENT</type>
<key>selectel_balance[vmware.prediction.hours,{$TOKEN}]</key>
<delay>0</delay>
<history>60d</history>
<units>час(а/ов)</units>
<description>Баланс vmware — часов до блокировки</description>
<applications>
<application>
<name>Billing</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<parameters>
<parameter>$.data.vmware.prediction.hours</parameter>
</parameters>
</step>
</preprocessing>
<master_item>
<key>selectel_balance</key>
</master_item>
<triggers>
<trigger>
<expression>{last()}&lt;6</expression>
<recovery_mode>RECOVERY_EXPRESSION</recovery_mode>
<recovery_expression>{last()}&gt;=6</recovery_expression>
<name>Осталось {ITEM.VALUE} часов до блокировки ресурсов Selectel!</name>
<priority>DISASTER</priority>
<description>Осталось менее {ITEM.VALUE} часов до блокировки!</description>
<manual_close>YES</manual_close>
</trigger>
<trigger>
<expression>{last()}&lt;24</expression>
<recovery_mode>RECOVERY_EXPRESSION</recovery_mode>
<recovery_expression>{last()}&gt;=24</recovery_expression>
<name>Осталось {ITEM.VALUE} часов до блокировки ресурсов Selectel!</name>
<priority>HIGH</priority>
<description>Осталось менее {ITEM.VALUE} часов до блокировки!</description>
<manual_close>YES</manual_close>
</trigger>
<trigger>
<expression>{last()}&lt;96</expression>
<recovery_mode>RECOVERY_EXPRESSION</recovery_mode>
<recovery_expression>{last()}&gt;=96</recovery_expression>
<name>Осталось {ITEM.VALUE} часов до блокировки ресурсов Selectel!</name>
<priority>WARNING</priority>
<description>Осталось менее {ITEM.VALUE} часов до блокировки!</description>
<manual_close>YES</manual_close>
</trigger>
</triggers>
</item>
<item>
<name>Баланс vmware - Итого</name>
<type>DEPENDENT</type>
<key>selectel_balance[vmware.sum,{$TOKEN}]</key>
<delay>0</delay>
<history>60d</history>
<units>Руб.</units>
<description>Баланс vmware — Итого</description>
<applications>
<application>
<name>Billing</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<parameters>
<parameter>$.data.vmware.sum</parameter>
</parameters>
</step>
<step>
<type>MULTIPLIER</type>
<parameters>
<parameter>0.01</parameter>
</parameters>
</step>
</preprocessing>
<master_item>
<key>selectel_balance</key>
</master_item>
</item>
<item>
<name>Баланс vmware - голоса приложения Вконтакте</name>
<type>DEPENDENT</type>
<key>selectel_balance[vmware.vk_rub,{$TOKEN}]</key>
<delay>0</delay>
<history>60d</history>
<units>Руб.</units>
<description>Баланс vmware — Голоса ВКонтакте — голоса приложения Вконтакте</description>
<applications>
<application>
<name>Billing</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<parameters>
<parameter>$.data.vmware.debt</parameter>
</parameters>
</step>
<step>
<type>MULTIPLIER</type>
<parameters>
<parameter>0.01</parameter>
</parameters>
</step>
</preprocessing>
<master_item>
<key>selectel_balance</key>
</master_item>
</item>
<item>
<name>Баланс облачной платформы - основной бонусный баланс</name>
<type>DEPENDENT</type>
<key>selectel_balance[vpc.bonus,{$TOKEN}]</key>
<delay>0</delay>
<history>60d</history>
<units>Руб.</units>
<description>Баланс облачной платформы — Бонусы — основной бонусный баланс</description>
<applications>
<application>
<name>Billing</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<parameters>
<parameter>$.data.vpc.bonus</parameter>
</parameters>
</step>
<step>
<type>MULTIPLIER</type>
<parameters>
<parameter>0.01</parameter>
</parameters>
</step>
</preprocessing>
<master_item>
<key>selectel_balance</key>
</master_item>
</item>
<item>
<name>Баланс облачной платформы - Долг</name>
<type>DEPENDENT</type>
<key>selectel_balance[vpc.debt,{$TOKEN}]</key>
<delay>0</delay>
<history>60d</history>
<units>Руб.</units>
<description>Баланс облачной платформы — Долг</description>
<applications>
<application>
<name>Billing</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<parameters>
<parameter>$.data.vpc.debt</parameter>
</parameters>
</step>
<step>
<type>MULTIPLIER</type>
<parameters>
<parameter>0.01</parameter>
</parameters>
</step>
</preprocessing>
<master_item>
<key>selectel_balance</key>
</master_item>
</item>
<item>
<name>Баланс облачной платформы - основной лицевой счет</name>
<type>DEPENDENT</type>
<key>selectel_balance[vpc.main,{$TOKEN}]</key>
<delay>0</delay>
<history>60d</history>
<units>Руб.</units>
<description>Баланс облачной платформы — основной лицевой счет</description>
<applications>
<application>
<name>Billing</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<parameters>
<parameter>$.data.vpc.main</parameter>
</parameters>
</step>
<step>
<type>MULTIPLIER</type>
<parameters>
<parameter>0.01</parameter>
</parameters>
</step>
</preprocessing>
<master_item>
<key>selectel_balance</key>
</master_item>
</item>
<item>
<name>Баланс облачной платформы - Итого</name>
<type>DEPENDENT</type>
<key>selectel_balance[vpc.sum,{$TOKEN}]</key>
<delay>0</delay>
<history>60d</history>
<units>Руб.</units>
<description>Баланс облачной платформы — Итого</description>
<applications>
<application>
<name>Billing</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<parameters>
<parameter>$.data.vpc.sum</parameter>
</parameters>
</step>
<step>
<type>MULTIPLIER</type>
<parameters>
<parameter>0.01</parameter>
</parameters>
</step>
</preprocessing>
<master_item>
<key>selectel_balance</key>
</master_item>
</item>
<item>
<name>Баланс облачной платформы - голоса приложения Вконтакте</name>
<type>DEPENDENT</type>
<key>selectel_balance[vpc.vk_rub,{$TOKEN}]</key>
<delay>0</delay>
<history>60d</history>
<units>Руб.</units>
<description>Баланс облачной платформы — Голоса ВКонтакте — голоса приложения Вконтакте</description>
<applications>
<application>
<name>Billing</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<parameters>
<parameter>$.data.vpc.vk_rub</parameter>
</parameters>
</step>
<step>
<type>MULTIPLIER</type>
<parameters>
<parameter>0.01</parameter>
</parameters>
</step>
</preprocessing>
<master_item>
<key>selectel_balance</key>
</master_item>
</item>
</items>
<macros>
<macro>
<macro>{$TOKEN}</macro>
<description>Токен для авторизации</description>
</macro>
</macros>
</template>
</templates>
<graphs>
<graph>
<name>Баланс vmware - часов до блокировки</name>
<graph_items>
<graph_item>
<sortorder>1</sortorder>
<color>1A7C11</color>
<item>
<host>Selectel Billing</host>
<key>selectel_balance[vmware.prediction.hours,{$TOKEN}]</key>
</item>
</graph_item>
</graph_items>
</graph>
</graphs>
</zabbix_export>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment