Общая топология сети: различия между версиями
(Новая страница: «Расширение '''SNMP Autodiscovery''' сканирует подсети и помогает пользователям обнаружить весь с...») |
|||
| Строка 96: | Строка 96: | ||
После внедрения предложенных изменений выполните следующие дополнительные шаги: | После внедрения предложенных изменений выполните следующие дополнительные шаги: | ||
1. Подключите имеющиеся у вас данные к сетевому устройству: | |||
* Создайте новую запись <code>topology.types</code> следующим образом: | |||
{| class="wikitable" | |||
|<nowiki>- name: network:device</nowiki> | |||
enabled: true | |||
displayName: Network device | |||
rules: [] # You will populate this at the next step | |||
|} | |||
* Добавьте правила для привязки ваших данных к сущности (замените <code>[]</code>) | |||
Примечание: Вы можете определить существующий тип сущности, похожий на сетевое устройство, и скопировать все правила из его определения. | |||
Убедитесь, что каждое правило определяет следующее: | |||
{| class="wikitable" | |||
|<nowiki>- idPattern: network_device_{device.address}</nowiki> | |||
instanceNamePattern: "{sys.name}" | |||
role: default | |||
|} | |||
Примечание: <code>device.address</code> и <code>sys.name</code> являются заполнителями, которые могут содержать любые другие параметры, но они должны указывать управляющий IP-адрес и имя устройства. | |||
2. Подключите имеющиеся у вас данные к сетевому интерфейсу: | |||
* Создайте новую запись <code>topology.types</code> следующим образом: | |||
{| class="wikitable" | |||
|<nowiki>- name: network:interface</nowiki> | |||
enabled: true | |||
displayName: Network interface | |||
rules: [] # You will populate this in the next step | |||
|} | |||
* Добавьте правила для привязки ваших данных к сущности (замените приведенный выше код <code>[]</code>). | |||
Примечание: Вы можете определить существующий тип, похожий на сетевой интерфейс, и скопировать все правила из его определения. | |||
Убедитесь, что каждое правило определяет следующее: | |||
{| class="wikitable" | |||
|<nowiki>- idPattern: network_interface_{mac.address}_{if.name}</nowiki> | |||
instanceNamePattern: "{if.name}" | |||
role: default | |||
|} | |||
Примечание: <code>mac.address</code> и <code>if.name</code> являются заполнителями, которые могут содержать любые другие параметры, но они должны указывать MAC-адрес и имя интерфейса. | |||
3. Изобразите отношения "same as": | |||
* Создайте две записи в файле <code>topology.relationships</code>. Каждая из них должна основываться на данных, аналогичных тем, которые вы использовали на предыдущих шагах. | |||
{| class="wikitable" | |||
|<nowiki>- fromType: "" # Add your existing entity type that resembles a network device</nowiki> | |||
typeOfRelation: SAME_AS | |||
toType: `network:device` | |||
sources: | |||
- sourceType: Metrics | |||
condition: "" # Match any of the metrics that you used for the network:device entity rule | |||
- fromType: "" # Add your existing entity type that resembles a network interface | |||
typeOfRelation: SAME_AS | |||
toType: `network:interface` | |||
sources: | |||
- sourceType: Metrics | |||
condition: "" # Match any of the metrics that you used for the network:interface entity rule | |||
|} | |||
4. Настройте пользовательский интерфейс: | |||
* Создайте новую запись <code>screens</code> для сетевого устройства: | |||
{| class="wikitable" | |||
|screens: | |||
- entityType: network:device | |||
|} | |||
* Отобразите ссылку для детализации данных по специализированному объекту: | |||
Добавьте свойство типа <code>RELATION</code>, указывающее на вашу существующую сущность <code>propertiesCard</code>. | |||
{| class="wikitable" | |||
|propertiesCard: | |||
properties: | |||
- type: RELATION | |||
relation: | |||
# replace your_type with your existing entity type | |||
entitySelectorTemplate: type(your_type),fromRelationships.isSameAs($(entityConditions)) | |||
displayName: Linked entity | |||
conditions: | |||
# Replace your_type with your existing entity type | |||
- relatedEntity|entitySelectorTemplate=type(your_type),fromRelationships.isSameAs($(entityConditions)) | |||
# Ensures it only appears on monitored devices | |||
- entityAttribute|devMonitoringMode=Extension | |||
|} | |||
* Отобразите имеющиеся у вас диаграммы на экране сетевого устройства: | |||
Самый простой способ — внедрить их по ссылке с экрана вашей существующей сущности. | |||
Примечание: Никогда ничего не определяйте в <code>detailsSettings</code>, всегда в <code>detailsInjections</code>. | |||
{| class="wikitable" | |||
|detailsInjections: | |||
- type: CHART_GROUP | |||
key: my-custom-chart | |||
# replace your_type with your existing entity type | |||
entitySelectorTemplate: type(your_type),fromRelationships.isSameAs($(entityConditions)) | |||
conditions: | |||
# Replace your_type with your existing entity type | |||
- relatedEntity|entitySelectorTemplate=type(your_type),fromRelationships.isSameAs($(entityConditions)) | |||
# Ensures it only appears on monitored devices | |||
- entityAttribute|devMonitoringMode=Extension | |||
|} | |||
* Создайте новые диаграммы для сетевого устройства: | |||
{| class="wikitable" | |||
|detailsInjections: | |||
- type: CHART_GROUP | |||
key: my-custom-chart | |||
conditions: | |||
# Ensures it only appears on monitored devices | |||
- entityAttribute|devMonitoringMode=Extension | |||
chartsCards: | |||
- key: my-custom-chart | |||
type: CHART_GROUP | |||
# Rest of definition goes here... | |||
|} | |||
=== Что можно ожидать на этом этапе? === | |||
Объект сетевого устройства связан с расширенным набором метрик (полученных из специализированного расширения), сообщает о дополнительных атрибутах, отображает некоторые данные специализированного расширения на своей странице с подробными сведениями и сохраняет ссылку для детализации данных на специализированный объект. | |||
== Файлы манифеста == | |||
=== <code>1_initial.yaml</code> === | |||
Это неизмененное расширение. | |||
Она отслеживает балансировщик нагрузки F5, отправляя данные в Ключ-АСТРОМ, но не имея представления о модели устройства. | |||
{| class="wikitable mw-collapsible mw-collapsed" | |||
!<code>1_initial.yaml</code> | |||
|- | |||
|name: custom:f5-load-balancer | |||
version: 1.0.0 | |||
minastromkeyVersion: 1.289.0 | |||
author: | |||
name: astromkey | |||
snmp: | |||
- group: f5 | |||
interval: | |||
minutes: 1 | |||
dimensions: | |||
- key: instance.name | |||
value: oid:1.3.6.1.2.1.1.5.0 | |||
- key: failover.state | |||
value: oid:1.3.6.1.4.1.3375.2.1.14.3.1.0 | |||
- key: sync.state | |||
value: oid:1.3.6.1.4.1.3375.2.1.14.1.1.0 | |||
subgroups: | |||
- subgroup: f5-instance-details | |||
table: false | |||
dimensions: | |||
- key: instance.systemname | |||
value: oid:1.3.6.1.4.1.3375.2.1.6.1.0 | |||
- key: instance.systemrelease | |||
value: oid:1.3.6.1.4.1.3375.2.1.6.3.0 | |||
- key: instance.systemarch | |||
value: oid:1.3.6.1.4.1.3375.2.1.6.5.0 | |||
- key: instance.productversion | |||
value: oid:1.3.6.1.4.1.3375.2.1.4.2.0 | |||
metrics: | |||
- key: f5.lb.sys.uptime | |||
value: oid:1.3.6.1.4.1.3375.2.1.6.6.0 | |||
- subgroup: f5-interface-details | |||
featureSet: interface | |||
table: true | |||
dimensions: | |||
- key: interface.name | |||
value: oid:1.3.6.1.4.1.3375.2.1.2.4.1.2.1.1 | |||
- key: interface.enabled | |||
value: oid:1.3.6.1.4.1.3375.2.1.2.4.1.2.1.8 | |||
- key: interface.status | |||
value: oid:1.3.6.1.4.1.3375.2.1.2.4.1.2.1.17 | |||
- key: mac.address | |||
value: $networkFormat(const:macAddress, oid:1.3.6.1.4.1.3375.2.1.2.4.1.2.1.6) | |||
metrics: | |||
- key: f5.lb.sys.interface.status | |||
value: const:1 | |||
- subgroup: f5-interface-metrics | |||
featureSet: interface | |||
table: true | |||
dimensions: | |||
- key: interface.name | |||
value: oid:1.3.6.1.4.1.3375.2.1.2.4.4.3.1.1 | |||
metrics: | |||
- key: f5.lb.sys.interface.stat.bytes.in.count | |||
value: oid:1.3.6.1.4.1.3375.2.1.2.4.4.3.1.3 | |||
type: count | |||
- key: f5.lb.sys.interface.stat.bytes.out.count | |||
value: oid:1.3.6.1.4.1.3375.2.1.2.4.4.3.1.5 | |||
type: count | |||
- key: f5.lb.sys.interface.stat.pkts.in.count | |||
value: oid:1.3.6.1.4.1.3375.2.1.2.4.4.3.1.2 | |||
type: count | |||
- key: f5.lb.sys.interface.stat.pkts.out.count | |||
value: oid:1.3.6.1.4.1.3375.2.1.2.4.4.3.1.4 | |||
type: count | |||
- subgroup: f5-cpu | |||
table: false | |||
featureSet: instance-cpu | |||
metrics: | |||
- key: f5.lb.sys.global.host.cpu.idle1m | |||
value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.25.0 | |||
- key: f5.lb.sys.global.host.cpu.iowait1m | |||
value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.28.0 | |||
- key: f5.lb.sys.global.host.cpu.irq1m | |||
value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.26.0 | |||
- key: f5.lb.sys.global.host.cpu.softirq1min | |||
value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.27.0 | |||
- key: f5.lb.sys.global.host.cpu.stolen1m | |||
value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.40.0 | |||
- key: f5.lb.sys.global.host.cpu.system1m | |||
value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.24.0 | |||
- key: f5.lb.sys.global.host.cpu.user1m | |||
value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.22.0 | |||
- subgroup: f5-memory | |||
table: false | |||
featureSet: instance-memory | |||
metrics: | |||
- key: f5.lb.sys.host.memory.total | |||
value: oid:1.3.6.1.4.1.3375.2.1.7.1.1.0 | |||
- key: f5.lb.sys.host.memory.used | |||
value: oid:1.3.6.1.4.1.3375.2.1.7.1.2.0 | |||
topology: | |||
types: | |||
- name: f5lb:instance | |||
displayName: F5 BIG-IP Instance | |||
rules: | |||
- idPattern: f5_instance_{instance.name} | |||
instanceNamePattern: '{instance.name}' | |||
iconPattern: f5 | |||
sources: | |||
- sourceType: Metrics | |||
condition: $eq(f5.lb.sys.uptime) | |||
attributes: | |||
- key: dt.ip_addresses | |||
displayName: IP Address | |||
pattern: '{device.address}' | |||
- key: dt.dns_names | |||
displayName: DNS Name | |||
pattern: '{instance.name}' | |||
- key: OSRelease | |||
displayName: OS release | |||
pattern: '{instance.systemrelease}' | |||
- key: OSArchitecture | |||
displayName: OS architecture | |||
pattern: '{instance.systemarch}' | |||
- key: OSName | |||
displayName: OS name | |||
pattern: '{instance.systemname}' | |||
- key: ProductVersion | |||
displayName: Product version | |||
pattern: '{instance.productversion}' | |||
- key: FailoverStatus | |||
pattern: '{failover.state}' | |||
displayName: Failover status | |||
- key: SyncStatus | |||
pattern: '{sync.state}' | |||
displayName: Config sync status | |||
role: default | |||
- idPattern: f5_instance_{instance.name} | |||
instanceNamePattern: '{instance.name}' | |||
iconPattern: f5 | |||
sources: | |||
- sourceType: Metrics | |||
condition: $prefix(f5.lb) | |||
requiredDimensions: [] | |||
attributes: [] | |||
role: default | |||
- name: f5lb:interface | |||
displayName: F5 BIG-IP Interface | |||
rules: | |||
- idPattern: f5_interface_{instance.name}_{interface.name} | |||
instanceNamePattern: '{interface.name}' | |||
iconPattern: network-interfaces | |||
sources: | |||
- sourceType: Metrics | |||
condition: $eq(f5.lb.sys.interface.status) | |||
attributes: | |||
- key: EnabledState | |||
displayName: Enabled State | |||
pattern: '{interface.enabled}' | |||
- key: MacAddress | |||
displayName: MAC Address | |||
pattern: '{mac.address}' | |||
- key: Status | |||
displayName: Status | |||
pattern: '{interface.status}' | |||
role: default | |||
- idPattern: f5_interface_{instance.name}_{interface.name} | |||
instanceNamePattern: '{interface.name}' | |||
iconPattern: network-interfaces | |||
sources: | |||
- sourceType: Metrics | |||
condition: $prefix(f5.lb.sys.interface) | |||
requiredDimensions: [] | |||
attributes: [] | |||
role: default | |||
relationships: | |||
- fromType: f5lb:interface | |||
typeOfRelation: RUNS_ON | |||
toType: f5lb:instance | |||
sources: | |||
- sourceType: Metrics | |||
condition: $prefix(f5.lb.sys.interface) | |||
screens: | |||
- entityType: f5lb:instance | |||
detailsSettings: | |||
staticContent: | |||
showProblems: true | |||
showProperties: true | |||
showTags: true | |||
showGlobalFilter: true | |||
showAddTag: true | |||
target: BOTH | |||
layout: | |||
autoGenerate: false | |||
cards: | |||
- key: f5_instance-charts-cpu | |||
type: CHART_GROUP | |||
- key: f5_instance-charts-memory | |||
type: CHART_GROUP | |||
chartsCards: | |||
- key: f5_instance-charts-cpu | |||
target: BOTH | |||
mode: NORMAL | |||
displayName: CPU | |||
numberOfVisibleCharts: 4 | |||
chartsInRow: 4 | |||
charts: | |||
- displayName: CPU Breakdown | |||
visualizationType: GRAPH_CHART | |||
graphChartConfig: | |||
connectGaps: true | |||
stacked: true | |||
metrics: | |||
- metricSelector: f5.lb.sys.global.host.cpu.idle1m:splitBy("dt.entity.f5lb:instance") | |||
dqlQuery: timeseries idle1m=avg(f5.lb.sys.global.host.cpu.idle1m),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} | |||
visualization: | |||
displayName: Idle | |||
- metricSelector: f5.lb.sys.global.host.cpu.system1m:splitBy("dt.entity.f5lb:instance") | |||
dqlQuery: timeseries system1m=avg(f5.lb.sys.global.host.cpu.system1m),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} | |||
visualization: | |||
displayName: System | |||
- metricSelector: f5.lb.sys.global.host.cpu.user1m:splitBy("dt.entity.f5lb:instance") | |||
dqlQuery: timeseries user1m=avg(f5.lb.sys.global.host.cpu.user1m),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} | |||
visualization: | |||
displayName: User | |||
visualization: | |||
themeColor: DEFAULT | |||
seriesType: AREA | |||
- displayName: System CPU | |||
visualizationType: GRAPH_CHART | |||
graphChartConfig: | |||
connectGaps: true | |||
metrics: | |||
- metricSelector: f5.lb.sys.global.host.cpu.system1m:splitBy("dt.entity.f5lb:instance") | |||
dqlQuery: timeseries system1m=avg(f5.lb.sys.global.host.cpu.system1m),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} | |||
visualization: | |||
themeColor: BLUE | |||
seriesType: LINE | |||
- displayName: User CPU | |||
visualizationType: GRAPH_CHART | |||
graphChartConfig: | |||
connectGaps: true | |||
metrics: | |||
- metricSelector: f5.lb.sys.global.host.cpu.user1m:splitBy("dt.entity.f5lb:instance") | |||
dqlQuery: timeseries user1m=avg(f5.lb.sys.global.host.cpu.user1m),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} | |||
visualization: | |||
themeColor: BLUE | |||
seriesType: LINE | |||
- displayName: Idle CPU | |||
visualizationType: GRAPH_CHART | |||
graphChartConfig: | |||
connectGaps: true | |||
metrics: | |||
- metricSelector: f5.lb.sys.global.host.cpu.idle1m:splitBy("dt.entity.f5lb:instance") | |||
dqlQuery: timeseries idle1m=avg(f5.lb.sys.global.host.cpu.idle1m),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} | |||
visualization: | |||
themeColor: BLUE | |||
seriesType: LINE | |||
- key: f5_instance-charts-memory | |||
target: BOTH | |||
mode: NORMAL | |||
displayName: Memory | |||
numberOfVisibleCharts: 4 | |||
hideEmptyCharts: true | |||
charts: | |||
- displayName: Memory breakdown | |||
visualizationType: GRAPH_CHART | |||
graphChartConfig: | |||
connectGaps: true | |||
yAxes: | |||
- key: y-absolute | |||
position: LEFT | |||
visible: true | |||
- key: y-relative | |||
position: RIGHT | |||
visible: true | |||
min: '0' | |||
max: '100' | |||
metrics: | |||
- metricSelector: f5.lb.sys.host.memory.total:splitBy("dt.entity.f5lb:instance") | |||
dqlQuery: timeseries total=avg(f5.lb.sys.host.memory.total),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} | |||
yAxisKey: y-absolute | |||
visualization: | |||
themeColor: BLUE | |||
seriesType: AREA | |||
displayName: Total | |||
- metricSelector: f5.lb.sys.host.memory.used:splitBy("dt.entity.f5lb:instance") | |||
dqlQuery: timeseries used=avg(f5.lb.sys.host.memory.used),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} | |||
yAxisKey: y-absolute | |||
visualization: | |||
themeColor: ORANGE | |||
seriesType: AREA | |||
displayName: Used | |||
|} | |||
=== <code>2_basic.yaml</code> === | |||
Здесь представлены основные примеры использования. | |||
Теперь Ключ-АСТРОМ распознает балансировщик нагрузки F5 как сетевое устройство с интерфейсами и портами. Другие приложения также будут его отображать. | |||
{| class="wikitable mw-collapsible mw-collapsed" | |||
!<code>2_basic.yaml</code> | |||
|- | |||
|name: custom:f5-load-balancer | |||
version: 1.1.0 | |||
minastromkeyVersion: 1.289.0 | |||
author: | |||
name: astromkey | |||
<nowiki>#</nowiki> In this example, we add the basic metrics & dimensions for the network model. | |||
<nowiki>#</nowiki> We chose to spread them in-between the existing metrics where possible, but | |||
<nowiki>#</nowiki> they could just as well be extracted into separate groups & subgroups. | |||
snmp: | |||
- group: f5 | |||
interval: | |||
minutes: 1 | |||
dimensions: | |||
- key: instance.name | |||
value: oid:1.3.6.1.2.1.1.5.0 | |||
- key: failover.state | |||
value: oid:1.3.6.1.4.1.3375.2.1.14.3.1.0 | |||
- key: sync.state | |||
value: oid:1.3.6.1.4.1.3375.2.1.14.1.1.0 | |||
# Adding the mandatory dimensions here ensures they appear everywhere | |||
- key: monitoring.mode | |||
value: const:Extension | |||
- key: sys.name | |||
value: oid:1.3.6.1.2.1.1.5.0 | |||
- key: device.type | |||
value: const:F5 Load balancer | |||
subgroups: | |||
- subgroup: f5-instance-details | |||
table: false | |||
dimensions: | |||
- key: instance.systemname | |||
value: oid:1.3.6.1.4.1.3375.2.1.6.1.0 | |||
- key: instance.systemrelease | |||
value: oid:1.3.6.1.4.1.3375.2.1.6.3.0 | |||
- key: instance.systemarch | |||
value: oid:1.3.6.1.4.1.3375.2.1.6.5.0 | |||
- key: instance.productversion | |||
value: oid:1.3.6.1.4.1.3375.2.1.4.2.0 | |||
metrics: | |||
- key: f5.lb.sys.uptime | |||
value: oid:1.3.6.1.4.1.3375.2.1.6.6.0 | |||
- key: com.astromkey.extension.network_device.sysuptime | |||
value: oid:1.3.6.1.4.1.3375.2.1.6.6.0 | |||
- subgroup: f5-interface-details | |||
featureSet: interface | |||
table: true | |||
dimensions: | |||
- key: interface.name | |||
value: oid:1.3.6.1.4.1.3375.2.1.2.4.1.2.1.1 | |||
- key: if.name | |||
value: oid:1.3.6.1.4.1.3375.2.1.2.4.1.2.1.1 | |||
- key: interface.enabled | |||
value: oid:1.3.6.1.4.1.3375.2.1.2.4.1.2.1.8 | |||
- key: interface.status | |||
value: oid:1.3.6.1.4.1.3375.2.1.2.4.1.2.1.17 | |||
- key: mac.address | |||
value: $networkFormat(const:macAddress, oid:1.3.6.1.4.1.3375.2.1.2.4.1.2.1.6) | |||
metrics: | |||
- key: f5.lb.sys.interface.status | |||
value: const:1 | |||
- key: com.astromkey.extension.network_device.if.status | |||
value: const:1 | |||
- subgroup: f5-interface-metrics | |||
featureSet: interface | |||
table: true | |||
dimensions: | |||
- key: interface.name | |||
value: oid:1.3.6.1.4.1.3375.2.1.2.4.4.3.1.1 | |||
metrics: | |||
- key: f5.lb.sys.interface.stat.bytes.in.count | |||
value: oid:1.3.6.1.4.1.3375.2.1.2.4.4.3.1.3 | |||
type: count | |||
- key: f5.lb.sys.interface.stat.bytes.out.count | |||
value: oid:1.3.6.1.4.1.3375.2.1.2.4.4.3.1.5 | |||
type: count | |||
- key: com.astromkey.extension.network_device.if.bytes_in.count | |||
value: oid:1.3.6.1.4.1.3375.2.1.2.4.4.3.1.3 | |||
type: count | |||
- key: com.astromkey.extension.network_device.if.bytes_out.count | |||
value: oid:1.3.6.1.4.1.3375.2.1.2.4.4.3.1.5 | |||
type: count | |||
- key: f5.lb.sys.interface.stat.pkts.in.count | |||
value: oid:1.3.6.1.4.1.3375.2.1.2.4.4.3.1.2 | |||
type: count | |||
- key: f5.lb.sys.interface.stat.pkts.out.count | |||
value: oid:1.3.6.1.4.1.3375.2.1.2.4.4.3.1.4 | |||
type: count | |||
- subgroup: f5-cpu | |||
table: false | |||
featureSet: instance-cpu | |||
metrics: | |||
- key: com.astromkey.extension.network_device.cpu_usage | |||
value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.29.0 | |||
- key: f5.lb.sys.global.host.cpu.idle1m | |||
value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.25.0 | |||
- key: f5.lb.sys.global.host.cpu.iowait1m | |||
value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.28.0 | |||
- key: f5.lb.sys.global.host.cpu.irq1m | |||
value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.26.0 | |||
- key: f5.lb.sys.global.host.cpu.softirq1min | |||
value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.27.0 | |||
- key: f5.lb.sys.global.host.cpu.stolen1m | |||
value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.40.0 | |||
- key: f5.lb.sys.global.host.cpu.system1m | |||
value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.24.0 | |||
- key: f5.lb.sys.global.host.cpu.user1m | |||
value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.22.0 | |||
- subgroup: f5-memory | |||
table: false | |||
featureSet: instance-memory | |||
metrics: | |||
- key: f5.lb.sys.host.memory.total | |||
value: oid:1.3.6.1.4.1.3375.2.1.7.1.1.0 | |||
- key: f5.lb.sys.host.memory.used | |||
value: oid:1.3.6.1.4.1.3375.2.1.7.1.2.0 | |||
- key: com.astromkey.extension.network_device.memory_used | |||
value: oid:1.3.6.1.4.1.3375.2.1.7.1.4.0 | |||
- key: com.astromkey.extension.network_device.memory_total | |||
value: oid:1.3.6.1.4.1.3375.2.1.7.1.3.0 | |||
topology: | |||
types: | |||
- name: f5lb:instance | |||
displayName: F5 BIG-IP Instance | |||
rules: | |||
- idPattern: f5_instance_{instance.name} | |||
instanceNamePattern: '{instance.name}' | |||
iconPattern: f5 | |||
sources: | |||
- sourceType: Metrics | |||
condition: $eq(f5.lb.sys.uptime) | |||
attributes: | |||
- key: dt.ip_addresses | |||
displayName: IP Address | |||
pattern: '{device.address}' | |||
- key: dt.dns_names | |||
displayName: DNS Name | |||
pattern: '{instance.name}' | |||
- key: OSRelease | |||
displayName: OS release | |||
pattern: '{instance.systemrelease}' | |||
- key: OSArchitecture | |||
displayName: OS architecture | |||
pattern: '{instance.systemarch}' | |||
- key: OSName | |||
displayName: OS name | |||
pattern: '{instance.systemname}' | |||
- key: ProductVersion | |||
displayName: Product version | |||
pattern: '{instance.productversion}' | |||
- key: FailoverStatus | |||
pattern: '{failover.state}' | |||
displayName: Failover status | |||
- key: SyncStatus | |||
pattern: '{sync.state}' | |||
displayName: Config sync status | |||
role: default | |||
- idPattern: f5_instance_{instance.name} | |||
instanceNamePattern: '{instance.name}' | |||
iconPattern: f5 | |||
sources: | |||
- sourceType: Metrics | |||
condition: $prefix(f5.lb) | |||
requiredDimensions: [] | |||
attributes: [] | |||
role: default | |||
- name: f5lb:interface | |||
displayName: F5 BIG-IP Interface | |||
rules: | |||
- idPattern: f5_interface_{instance.name}_{interface.name} | |||
instanceNamePattern: '{interface.name}' | |||
iconPattern: network-interfaces | |||
sources: | |||
- sourceType: Metrics | |||
condition: $eq(f5.lb.sys.interface.status) | |||
attributes: | |||
- key: EnabledState | |||
displayName: Enabled State | |||
pattern: '{interface.enabled}' | |||
- key: MacAddress | |||
displayName: MAC Address | |||
pattern: '{mac.address}' | |||
- key: Status | |||
displayName: Status | |||
pattern: '{interface.status}' | |||
role: default | |||
- idPattern: f5_interface_{instance.name}_{interface.name} | |||
instanceNamePattern: '{interface.name}' | |||
iconPattern: network-interfaces | |||
sources: | |||
- sourceType: Metrics | |||
condition: $prefix(f5.lb.sys.interface) | |||
requiredDimensions: [] | |||
attributes: [] | |||
role: default | |||
relationships: | |||
- fromType: f5lb:interface | |||
typeOfRelation: RUNS_ON | |||
toType: f5lb:instance | |||
sources: | |||
- sourceType: Metrics | |||
condition: $prefix(f5.lb.sys.interface) | |||
screens: | |||
- entityType: f5lb:instance | |||
detailsSettings: | |||
staticContent: | |||
showProblems: true | |||
showProperties: true | |||
showTags: true | |||
showGlobalFilter: true | |||
showAddTag: true | |||
target: BOTH | |||
layout: | |||
autoGenerate: false | |||
cards: | |||
- key: f5_instance-charts-cpu | |||
type: CHART_GROUP | |||
- key: f5_instance-charts-memory | |||
type: CHART_GROUP | |||
chartsCards: | |||
- key: f5_instance-charts-cpu | |||
target: BOTH | |||
mode: NORMAL | |||
displayName: CPU | |||
numberOfVisibleCharts: 4 | |||
chartsInRow: 4 | |||
charts: | |||
- displayName: CPU Breakdown | |||
visualizationType: GRAPH_CHART | |||
graphChartConfig: | |||
connectGaps: true | |||
stacked: true | |||
metrics: | |||
- metricSelector: f5.lb.sys.global.host.cpu.idle1m:splitBy("dt.entity.f5lb:instance") | |||
dqlQuery: timeseries idle1m=avg(f5.lb.sys.global.host.cpu.idle1m),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} | |||
visualization: | |||
displayName: Idle | |||
- metricSelector: f5.lb.sys.global.host.cpu.system1m:splitBy("dt.entity.f5lb:instance") | |||
dqlQuery: timeseries system1m=avg(f5.lb.sys.global.host.cpu.system1m),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} | |||
visualization: | |||
displayName: System | |||
- metricSelector: f5.lb.sys.global.host.cpu.user1m:splitBy("dt.entity.f5lb:instance") | |||
dqlQuery: timeseries user1m=avg(f5.lb.sys.global.host.cpu.user1m),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} | |||
visualization: | |||
displayName: User | |||
visualization: | |||
themeColor: DEFAULT | |||
seriesType: AREA | |||
- displayName: System CPU | |||
visualizationType: GRAPH_CHART | |||
graphChartConfig: | |||
connectGaps: true | |||
metrics: | |||
- metricSelector: f5.lb.sys.global.host.cpu.system1m:splitBy("dt.entity.f5lb:instance") | |||
dqlQuery: timeseries system1m=avg(f5.lb.sys.global.host.cpu.system1m),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} | |||
visualization: | |||
themeColor: BLUE | |||
seriesType: LINE | |||
- displayName: User CPU | |||
visualizationType: GRAPH_CHART | |||
graphChartConfig: | |||
connectGaps: true | |||
metrics: | |||
- metricSelector: f5.lb.sys.global.host.cpu.user1m:splitBy("dt.entity.f5lb:instance") | |||
dqlQuery: timeseries user1m=avg(f5.lb.sys.global.host.cpu.user1m),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} | |||
visualization: | |||
themeColor: BLUE | |||
seriesType: LINE | |||
- displayName: Idle CPU | |||
visualizationType: GRAPH_CHART | |||
graphChartConfig: | |||
connectGaps: true | |||
metrics: | |||
- metricSelector: f5.lb.sys.global.host.cpu.idle1m:splitBy("dt.entity.f5lb:instance") | |||
dqlQuery: timeseries idle1m=avg(f5.lb.sys.global.host.cpu.idle1m),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} | |||
visualization: | |||
themeColor: BLUE | |||
seriesType: LINE | |||
- key: f5_instance-charts-memory | |||
target: BOTH | |||
mode: NORMAL | |||
displayName: Memory | |||
numberOfVisibleCharts: 4 | |||
hideEmptyCharts: true | |||
charts: | |||
- displayName: Memory breakdown | |||
visualizationType: GRAPH_CHART | |||
graphChartConfig: | |||
connectGaps: true | |||
yAxes: | |||
- key: y-absolute | |||
position: LEFT | |||
visible: true | |||
- key: y-relative | |||
position: RIGHT | |||
visible: true | |||
min: '0' | |||
max: '100' | |||
metrics: | |||
- metricSelector: f5.lb.sys.host.memory.total:splitBy("dt.entity.f5lb:instance") | |||
dqlQuery: timeseries total=avg(f5.lb.sys.host.memory.total),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} | |||
yAxisKey: y-absolute | |||
visualization: | |||
themeColor: BLUE | |||
seriesType: AREA | |||
displayName: Total | |||
- metricSelector: f5.lb.sys.host.memory.used:splitBy("dt.entity.f5lb:instance") | |||
dqlQuery: timeseries used=avg(f5.lb.sys.host.memory.used),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} | |||
yAxisKey: y-absolute | |||
visualization: | |||
themeColor: ORANGE | |||
seriesType: AREA | |||
displayName: Used | |||
|} | |||
=== <code>3_advanced.yaml</code> === | |||
Демонстрирует расширенные возможности использования. | |||
Теперь сетевое устройство и интерфейс имеют доступ к большему объему данных. Сетевому устройству также были добавлены дополнительные атрибуты и диаграммы для отображения. | |||
{| class="wikitable mw-collapsible mw-collapsed" | |||
!<code>3_advanced.yaml</code> | |||
|- | |||
|name: custom:f5-load-balancer | |||
version: 1.2.0 | |||
minastromkeyVersion: 1.289.0 | |||
author: | |||
name: astromkey | |||
<nowiki>#</nowiki> In this example, we add topology rules for customizing the network model. | |||
<nowiki>#</nowiki> And modify the screens to customize the UI of the network device. | |||
<nowiki>#</nowiki> All other changes done so far stay the same. | |||
snmp: | |||
- group: f5 | |||
interval: | |||
minutes: 1 | |||
dimensions: | |||
- key: instance.name | |||
value: oid:1.3.6.1.2.1.1.5.0 | |||
- key: failover.state | |||
value: oid:1.3.6.1.4.1.3375.2.1.14.3.1.0 | |||
- key: sync.state | |||
value: oid:1.3.6.1.4.1.3375.2.1.14.1.1.0 | |||
# Adding the mandatory dimensions here ensures they appear everywhere | |||
- key: monitoring.mode | |||
value: const:Extension | |||
- key: sys.name | |||
value: oid:1.3.6.1.2.1.1.5.0 | |||
- key: device.type | |||
value: const:F5 Load balancer | |||
subgroups: | |||
- subgroup: f5-instance-details | |||
table: false | |||
dimensions: | |||
- key: instance.systemname | |||
value: oid:1.3.6.1.4.1.3375.2.1.6.1.0 | |||
- key: instance.systemrelease | |||
value: oid:1.3.6.1.4.1.3375.2.1.6.3.0 | |||
- key: instance.systemarch | |||
value: oid:1.3.6.1.4.1.3375.2.1.6.5.0 | |||
- key: instance.productversion | |||
value: oid:1.3.6.1.4.1.3375.2.1.4.2.0 | |||
metrics: | |||
- key: f5.lb.sys.uptime | |||
value: oid:1.3.6.1.4.1.3375.2.1.6.6.0 | |||
- key: com.astromkey.extension.network_device.sysuptime | |||
value: oid:1.3.6.1.4.1.3375.2.1.6.6.0 | |||
- subgroup: f5-interface-details | |||
featureSet: interface | |||
table: true | |||
dimensions: | |||
- key: interface.name | |||
value: oid:1.3.6.1.4.1.3375.2.1.2.4.1.2.1.1 | |||
- key: if.name | |||
value: oid:1.3.6.1.4.1.3375.2.1.2.4.1.2.1.1 | |||
- key: interface.enabled | |||
value: oid:1.3.6.1.4.1.3375.2.1.2.4.1.2.1.8 | |||
- key: interface.status | |||
value: oid:1.3.6.1.4.1.3375.2.1.2.4.1.2.1.17 | |||
- key: mac.address | |||
value: $networkFormat(const:macAddress, oid:1.3.6.1.4.1.3375.2.1.2.4.1.2.1.6) | |||
metrics: | |||
- key: f5.lb.sys.interface.status | |||
value: const:1 | |||
- key: com.astromkey.extension.network_device.if.status | |||
value: const:1 | |||
- subgroup: f5-interface-metrics | |||
featureSet: interface | |||
table: true | |||
dimensions: | |||
- key: interface.name | |||
value: oid:1.3.6.1.4.1.3375.2.1.2.4.4.3.1.1 | |||
metrics: | |||
- key: f5.lb.sys.interface.stat.bytes.in.count | |||
value: oid:1.3.6.1.4.1.3375.2.1.2.4.4.3.1.3 | |||
type: count | |||
- key: f5.lb.sys.interface.stat.bytes.out.count | |||
value: oid:1.3.6.1.4.1.3375.2.1.2.4.4.3.1.5 | |||
type: count | |||
- key: com.astromkey.extension.network_device.if.bytes_in.count | |||
value: oid:1.3.6.1.4.1.3375.2.1.2.4.4.3.1.3 | |||
type: count | |||
- key: com.astromkey.extension.network_device.if.bytes_out.count | |||
value: oid:1.3.6.1.4.1.3375.2.1.2.4.4.3.1.5 | |||
type: count | |||
- key: f5.lb.sys.interface.stat.pkts.in.count | |||
value: oid:1.3.6.1.4.1.3375.2.1.2.4.4.3.1.2 | |||
type: count | |||
- key: f5.lb.sys.interface.stat.pkts.out.count | |||
value: oid:1.3.6.1.4.1.3375.2.1.2.4.4.3.1.4 | |||
type: count | |||
- subgroup: f5-cpu | |||
table: false | |||
featureSet: instance-cpu | |||
metrics: | |||
- key: com.astromkey.extension.network_device.cpu_usage | |||
value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.29.0 | |||
- key: f5.lb.sys.global.host.cpu.idle1m | |||
value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.25.0 | |||
- key: f5.lb.sys.global.host.cpu.iowait1m | |||
value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.28.0 | |||
- key: f5.lb.sys.global.host.cpu.irq1m | |||
value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.26.0 | |||
- key: f5.lb.sys.global.host.cpu.softirq1min | |||
value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.27.0 | |||
- key: f5.lb.sys.global.host.cpu.stolen1m | |||
value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.40.0 | |||
- key: f5.lb.sys.global.host.cpu.system1m | |||
value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.24.0 | |||
- key: f5.lb.sys.global.host.cpu.user1m | |||
value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.22.0 | |||
- subgroup: f5-memory | |||
table: false | |||
featureSet: instance-memory | |||
metrics: | |||
- key: f5.lb.sys.host.memory.total | |||
value: oid:1.3.6.1.4.1.3375.2.1.7.1.1.0 | |||
- key: f5.lb.sys.host.memory.used | |||
value: oid:1.3.6.1.4.1.3375.2.1.7.1.2.0 | |||
- key: com.astromkey.extension.network_device.memory_used | |||
value: oid:1.3.6.1.4.1.3375.2.1.7.1.4.0 | |||
- key: com.astromkey.extension.network_device.memory_total | |||
value: oid:1.3.6.1.4.1.3375.2.1.7.1.3.0 | |||
topology: | |||
types: | |||
# These are already existing rules which we can copy & adjust | |||
- name: f5lb:instance # Closely resembles a network device | |||
displayName: F5 BIG-IP Instance | |||
rules: | |||
- idPattern: f5_instance_{instance.name} | |||
instanceNamePattern: '{instance.name}' | |||
iconPattern: f5 | |||
sources: | |||
- sourceType: Metrics | |||
condition: $eq(f5.lb.sys.uptime) | |||
attributes: | |||
- key: dt.ip_addresses | |||
displayName: IP Address | |||
pattern: '{device.address}' | |||
- key: dt.dns_names | |||
displayName: DNS Name | |||
pattern: '{instance.name}' | |||
- key: OSRelease | |||
displayName: OS release | |||
pattern: '{instance.systemrelease}' | |||
- key: OSArchitecture | |||
displayName: OS architecture | |||
pattern: '{instance.systemarch}' | |||
- key: OSName | |||
displayName: OS name | |||
pattern: '{instance.systemname}' | |||
- key: ProductVersion | |||
displayName: Product version | |||
pattern: '{instance.productversion}' | |||
- key: FailoverStatus | |||
pattern: '{failover.state}' | |||
displayName: Failover status | |||
- key: SyncStatus | |||
pattern: '{sync.state}' | |||
displayName: Config sync status | |||
role: default | |||
- idPattern: f5_instance_{instance.name} | |||
instanceNamePattern: '{instance.name}' | |||
iconPattern: f5 | |||
sources: | |||
- sourceType: Metrics | |||
condition: $prefix(f5.lb) | |||
requiredDimensions: [] | |||
attributes: [] | |||
role: default | |||
- name: f5lb:interface # Closely resembles a network interface | |||
displayName: F5 BIG-IP Interface | |||
rules: | |||
- idPattern: f5_interface_{instance.name}_{interface.name} | |||
instanceNamePattern: '{interface.name}' | |||
iconPattern: network-interfaces | |||
sources: | |||
- sourceType: Metrics | |||
condition: $eq(f5.lb.sys.interface.status) | |||
attributes: | |||
- key: EnabledState | |||
displayName: Enabled State | |||
pattern: '{interface.enabled}' | |||
- key: MacAddress | |||
displayName: MAC Address | |||
pattern: '{mac.address}' | |||
- key: Status | |||
displayName: Status | |||
pattern: '{interface.status}' | |||
role: default | |||
- idPattern: f5_interface_{instance.name}_{interface.name} | |||
instanceNamePattern: '{interface.name}' | |||
iconPattern: network-interfaces | |||
sources: | |||
- sourceType: Metrics | |||
condition: $prefix(f5.lb.sys.interface) | |||
requiredDimensions: [] | |||
attributes: [] | |||
role: default | |||
# These are new rules added to customize the model | |||
- name: network:device | |||
enabled: true | |||
displayName: Network device | |||
rules: | |||
- idPattern: network_device_{device.address} # must follow `network_device_{...}` pattern | |||
instanceNamePattern: '{instance.name}' | |||
iconPattern: f5 | |||
sources: | |||
- sourceType: Metrics | |||
condition: $eq(f5.lb.sys.uptime) # It's important to target specialized metrics, not the generic ones | |||
attributes: | |||
- key: dt.ip_addresses | |||
displayName: IP Address | |||
pattern: '{device.address}' | |||
- key: dt.dns_names | |||
displayName: DNS Name | |||
pattern: '{instance.name}' | |||
- key: OSRelease | |||
displayName: OS release | |||
pattern: '{instance.systemrelease}' | |||
- key: OSArchitecture | |||
displayName: OS architecture | |||
pattern: '{instance.systemarch}' | |||
- key: OSName | |||
displayName: OS name | |||
pattern: '{instance.systemname}' | |||
- key: ProductVersion | |||
displayName: Product version | |||
pattern: '{instance.productversion}' | |||
- key: FailoverStatus | |||
pattern: '{failover.state}' | |||
displayName: Failover status | |||
- key: SyncStatus | |||
pattern: '{sync.state}' | |||
displayName: Config sync status | |||
role: default | |||
- idPattern: network_device_{device.address} | |||
instanceNamePattern: '{instance.name}' | |||
iconPattern: f5 | |||
sources: | |||
- sourceType: Metrics | |||
condition: $prefix(f5.lb) | |||
requiredDimensions: [] | |||
attributes: [] | |||
role: default | |||
- name: network:interface | |||
enabled: true | |||
displayName: Network interface | |||
rules: | |||
- idPattern: network_interface_{mac.address}_{interface.name} # must follow `network_interface_{...}_{...}` pattern | |||
instanceNamePattern: '{interface.name}' | |||
iconPattern: network-interfaces | |||
sources: | |||
- sourceType: Metrics | |||
condition: $eq(f5.lb.sys.interface.status) # Again, we target specialized metrics, not generic ones | |||
attributes: | |||
- key: EnabledState | |||
displayName: Enabled State | |||
pattern: '{interface.enabled}' | |||
- key: MacAddress | |||
displayName: MAC Address | |||
pattern: '{mac.address}' | |||
- key: ifOperStatus | |||
displayName: Operational status | |||
pattern: '{interface.status}' | |||
role: default | |||
- idPattern: network_interface_{mac.address}_{interface.name} | |||
instanceNamePattern: '{interface.name}' | |||
iconPattern: network-interfaces | |||
sources: | |||
- sourceType: Metrics | |||
condition: $prefix(f5.lb.sys.interface) | |||
requiredDimensions: [] | |||
attributes: [] | |||
role: default | |||
relationships: | |||
- fromType: f5lb:interface | |||
typeOfRelation: RUNS_ON | |||
toType: f5lb:instance | |||
sources: | |||
- sourceType: Metrics | |||
condition: $prefix(f5.lb.sys.interface) | |||
# Adding the same as relationships | |||
- fromType: f5lb:interface | |||
typeOfRelation: SAME_AS | |||
toType: network:interface | |||
sources: | |||
- sourceType: Metrics | |||
condition: $prefix(f5.lb.sys.interface) | |||
- fromType: f5lb:instance | |||
typeOfRelation: SAME_AS | |||
toType: network:device | |||
sources: | |||
- sourceType: Metrics | |||
condition: $prefix(f5.lb) | |||
screens: | |||
# Customizing the screen for the network device | |||
- entityType: network:device | |||
propertiesCard: | |||
properties: | |||
# Show a link to the specialized entity | |||
- type: RELATION | |||
relation: | |||
entitySelectorTemplate: type(f5lb:instance),fromRelationships.isSameAs($(entityConditions)) | |||
displayName: F5 Load balancer | |||
conditions: | |||
# Apply only to devices that have a same as relation, who are monitored by Extension | |||
# These 2 conditions are used althroughout the screen definition | |||
- relatedEntity|entitySelectorTemplate=type(f5lb:instance),fromRelationships.isSameAs($(entityConditions)) | |||
- entityAttribute|devMonitoringMode=Extension | |||
# Must define everything in `detailsInjections` and not `detailsSettings`! | |||
detailsInjections: | |||
# This card is injected by reference, meaning we don't have to duplicate the definition again | |||
- type: CHART_GROUP | |||
key: f5_instance-charts-cpu | |||
# When using `entitySelectorTemplate`, the card is understood to be defined as part of the | |||
# resolved entity's screen definition, and not the current screen definition. | |||
entitySelectorTemplate: type(f5lb:instance),fromRelationships.isSameAs($(entityConditions)) | |||
conditions: | |||
- relatedEntity|entitySelectorTemplate=type(f5lb:instance),fromRelationships.isSameAs($(entityConditions)) | |||
- entityAttribute|devMonitoringMode=Extension | |||
# Of course, full definitions are still supported | |||
- type: CHART_GROUP | |||
key: network-interfaces-list | |||
chartsCards: | |||
- key: network-interfaces-list | |||
mode: NORMAL | |||
target: BOTH # Use CLASSIC for Managed, PLATFORM for SaaS, or BOTH for both | |||
displayName: Traffic | |||
numberOfVisibleCharts: 1 | |||
conditions: | |||
# Even if your card is generic, you should still apply this condition so that only | |||
# monitored devices display the card. | |||
- entityAttribute|devMonitoringMode=Extension | |||
charts: | |||
- displayName: Traffic in/out | |||
visualizationType: GRAPH_CHART | |||
graphChartConfig: | |||
metrics: | |||
# metricSelector is required for Managed | |||
- metricSelector: com.astromkey.extension.network_device.if.bytes_in.count:splitBy("dt.entity.network:device) | |||
# dqlQuery is required for SaaS | |||
dqlQuery: timeseries bytesIn=avg(com.astromkey.extension.network_device.if.bytes_in.count),by:{`dt.entity.network:device`},filter:{`dt.entity.network:device`==$(entityId)} | |||
visualization: | |||
displayName: Bytes In | |||
- metricSelector: com.astromkey.extension.network_device.if.bytes_out.count:splitBy("dt.entity.network:device") | |||
dqlQuery: timeseries bytesOut=avg(com.astromkey.extension.network_device.if.bytes_out.count),by:{`dt.entity.network:device`},filter:{`dt.entity.network:device`==$(entityId)} | |||
visualization: | |||
displayName: Bytes Out | |||
- entityType: f5lb:instance | |||
detailsSettings: | |||
staticContent: | |||
showProblems: true | |||
showProperties: true | |||
showTags: true | |||
showGlobalFilter: true | |||
showAddTag: true | |||
target: BOTH | |||
layout: | |||
autoGenerate: false | |||
cards: | |||
- key: f5_instance-charts-cpu | |||
type: CHART_GROUP | |||
- key: f5_instance-charts-memory | |||
type: CHART_GROUP | |||
chartsCards: | |||
- key: f5_instance-charts-cpu | |||
target: BOTH | |||
mode: NORMAL | |||
displayName: CPU | |||
numberOfVisibleCharts: 4 | |||
chartsInRow: 4 | |||
charts: | |||
- displayName: CPU Breakdown | |||
visualizationType: GRAPH_CHART | |||
graphChartConfig: | |||
connectGaps: true | |||
stacked: true | |||
metrics: | |||
- metricSelector: f5.lb.sys.global.host.cpu.idle1m:splitBy("dt.entity.f5lb:instance") | |||
dqlQuery: timeseries idle1m=avg(f5.lb.sys.global.host.cpu.idle1m),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} | |||
visualization: | |||
displayName: Idle | |||
- metricSelector: f5.lb.sys.global.host.cpu.system1m:splitBy("dt.entity.f5lb:instance") | |||
dqlQuery: timeseries system1m=avg(f5.lb.sys.global.host.cpu.system1m),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} | |||
visualization: | |||
displayName: System | |||
- metricSelector: f5.lb.sys.global.host.cpu.user1m:splitBy("dt.entity.f5lb:instance") | |||
dqlQuery: timeseries user1m=avg(f5.lb.sys.global.host.cpu.user1m),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} | |||
visualization: | |||
displayName: User | |||
visualization: | |||
themeColor: DEFAULT | |||
seriesType: AREA | |||
- displayName: System CPU | |||
visualizationType: GRAPH_CHART | |||
graphChartConfig: | |||
connectGaps: true | |||
metrics: | |||
- metricSelector: f5.lb.sys.global.host.cpu.system1m:splitBy("dt.entity.f5lb:instance") | |||
dqlQuery: timeseries system1m=avg(f5.lb.sys.global.host.cpu.system1m),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} | |||
visualization: | |||
themeColor: BLUE | |||
seriesType: LINE | |||
- displayName: User CPU | |||
visualizationType: GRAPH_CHART | |||
graphChartConfig: | |||
connectGaps: true | |||
metrics: | |||
- metricSelector: f5.lb.sys.global.host.cpu.user1m:splitBy("dt.entity.f5lb:instance") | |||
dqlQuery: timeseries user1m=avg(f5.lb.sys.global.host.cpu.user1m),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} | |||
visualization: | |||
themeColor: BLUE | |||
seriesType: LINE | |||
- displayName: Idle CPU | |||
visualizationType: GRAPH_CHART | |||
graphChartConfig: | |||
connectGaps: true | |||
metrics: | |||
- metricSelector: f5.lb.sys.global.host.cpu.idle1m:splitBy("dt.entity.f5lb:instance") | |||
dqlQuery: timeseries idle1m=avg(f5.lb.sys.global.host.cpu.idle1m),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} | |||
visualization: | |||
themeColor: BLUE | |||
seriesType: LINE | |||
- key: f5_instance-charts-memory | |||
target: BOTH | |||
mode: NORMAL | |||
displayName: Memory | |||
numberOfVisibleCharts: 4 | |||
hideEmptyCharts: true | |||
charts: | |||
- displayName: Memory breakdown | |||
visualizationType: GRAPH_CHART | |||
graphChartConfig: | |||
connectGaps: true | |||
yAxes: | |||
- key: y-absolute | |||
position: LEFT | |||
visible: true | |||
- key: y-relative | |||
position: RIGHT | |||
visible: true | |||
min: '0' | |||
max: '100' | |||
metrics: | |||
- metricSelector: f5.lb.sys.host.memory.total:splitBy("dt.entity.f5lb:instance") | |||
dqlQuery: timeseries total=avg(f5.lb.sys.host.memory.total),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} | |||
yAxisKey: y-absolute | |||
visualization: | |||
themeColor: BLUE | |||
seriesType: AREA | |||
displayName: Total | |||
- metricSelector: f5.lb.sys.host.memory.used:splitBy("dt.entity.f5lb:instance") | |||
dqlQuery: timeseries used=avg(f5.lb.sys.host.memory.used),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} | |||
yAxisKey: y-absolute | |||
visualization: | |||
themeColor: ORANGE | |||
seriesType: AREA | |||
displayName: Used | |||
|} | |||
Текущая версия на 15:20, 21 января 2026
Расширение SNMP Autodiscovery сканирует подсети и помогает пользователям обнаружить весь свой список сетевых устройств с поддержкой SNMP. Кроме того, это расширение также включает в себя топологическую модель, которая призвана быть достаточно универсальной, чтобы большинство источников данных, относящихся к сетевым устройствам, могли быть представлены с помощью простого набора общих сущностей: сетевое устройство, сетевой порт и сетевой интерфейс.
Сценарий
В этом руководстве подробно описаны концепции, связывающие данную топологию воедино, и объясняется, как вы — как разработчик расширений или интегратор данных — можете использовать ту же модель.
Поскольку это техническое руководство, мы рассмотрим полный пример, основанный на урезанной версии расширения F5 BIG-IP.
К данному руководству прилагаются три манифеста расширений:
1_initial.yamlэто неизменное расширение. Оно отслеживает балансировщик нагрузки F5, отправляя данные в Ключ-АСТРОМ, но не имея представления о модели устройства.2_basic.yamlдемонстрирует базовые возможности использования. Теперь Ключ-АСТРОМ распознает балансировщик нагрузки F5 как сетевое устройство с интерфейсами и портами. Другие приложения также будут его отображать.3_advanced.yamlдемонстрирует расширенные возможности использования. Теперь сетевое устройство и интерфейс имеют доступ к большему объему данных. Сетевому устройству также были добавлены дополнительные атрибуты и диаграммы для отображения.
Подробнее об этих файлах см. в разделе Файлы манифеста ниже.
| Для более детального изучения изменений между тремя вариантами манифеста можно использовать онлайн-инструмент, например, diffchecker. |
Ключевые понятия
Важно понимать, что топологическая модель в значительной степени определяется расширением SNMP Autodiscovery. Другим расширениям и интеграциям достаточно лишь обеспечить отправку корректных данных в Ключ-АСТРОМ и, при необходимости, определить дополнительные диаграммы для отображения в веб-интерфейсе.
Давайте рассмотрим топологические сущности и взаимосвязи.
Сетевое устройство
(network:device)
- Сетевое устройство — это физическое устройство в сети. Это основная сущность, на которой размещена операционная система и работают технологии, необходимые для обеспечения сетевой связи и других возможностей.
- Сетевое устройство идентифицируется по своему управляющему IP-адресу и обозначается системным именем.
Сетевой порт
(network:port)
- Сетевой порт — это физический аппаратный сетевой порт на сетевом устройстве.
- Сетевой порт идентифицируется и обозначается своим MAC-адресом.
Сетевой интерфейс
(network:interface)
- Сетевой интерфейс — это физический или виртуальный сетевой интерфейс (NIC). Как правило, это первая точка отсчета в сетевых коммуникациях между устройствами.
- Сетевой интерфейс идентифицируется комбинацией MAC-адреса и имени интерфейса и обозначается своим именем.
Связи
Эти типы сущностей связаны между собой следующими отношениями:
network:port-runsOn->network:devicenetwork:interface-runsOn->network:devicenetwork:interface-isChildOf->network:port
Основное применение
Как уже упоминалось ранее, другим расширениям и интеграциям достаточно отправлять данные в правильном формате, чтобы использовать эту топологию. Обязательные измерения должны присутствовать во всех метриках, тогда как необязательные измерения можно добавить к одной метрике, чтобы уменьшить ненужное разделение данных.
Параметры и метрики для сетевых устройств
Для сетевых устройств доступны следующие метрики и параметры.
- Обязательные параметры:
- Ключ:
device.address
Применение: идентифицирует каждое устройство и определяет, когда следует создавать новые экземпляры сущностей. - Ключ:
monitoring.mode
Применение: должно иметь фиксированное значение "Extension". Это влияет на пользовательский интерфейс и сообщает Ключ-АСТРОМ, что данный объект отслеживается. - Ключ:
sys.name
Применение: присваивает устройству метку, указывая его имя. - Ключ:
device.type
Применение: строка, представляющая тип устройства. Может быть названием технологии, маркой/моделью или просто меткой, например, "L3 Switch". Заполнит атрибут сущностиdevType.
- Ключ:
- Дополнительные (рекомендуемые) параметры:
- Ключ:
device.port
Применение: регистрирует порт прослушивания на устройстве. Дополнительные сущности не создаются, но атрибутdt.listen\portsбудет заполнен на основе уже созданного порта. - Ключ:
sys.description
Применение: регистрирует описание устройства в атрибутеdevDescription. Может содержать информацию о производителе или любой описательный текст.
- Ключ:
- Метрики :
- Ключ:
com.astromkey.extension.network_device.sysuptime
Описание: Время в системных тиках (1/100 секунды), прошедшее с момента последней перезагрузки системы. - Ключ:
com.astromkey.extension.network_device.cpu_usage
Описание: Применение ЦП системой, выраженное в процентах. - Ключ:
com.astromkey.extension.network_device.cpu_ratio
Описание: Применение ЦП системой, выраженное в виде отношения. - Ключ:
com.astromkey.extension.network_device.memory_used
Описание: Объем памяти в килобайтах, используемый устройством. - Ключ:
com.astromkey.extension.network_device.memory_free
Описание: Объем памяти в килобайтах, в данный момент свободный на устройстве. - Ключ:
com.astromkey.extension.network_device.memory_total
Описание: Общий (используемый и свободный) объем памяти в килобайтах, доступный на устройстве. - Ключ:
com.astromkey.extension.network_device.memory_usage
Описание: Текущий объем памяти, используемый устройством, выраженный в процентах от общего объема памяти.
- Ключ:
Параметры и метрики для сетевых интерфейсов
Ниже перечислены метрики и параметры, доступные для сетевых интерфейсов.
- Обязательные параметры:
- Ключ:
mac.address
Применение: в сочетании с именем идентифицирует каждый интерфейс и указывает, когда следует создавать новые экземпляры сущностей. Отдельно также идентифицирует сетевые порты и указывает, когда следует создавать новые экземпляры. - Ключ:
if.name
Применение: в сочетании с MAC-адресом идентифицирует каждый интерфейс. Также присваивает каждому интерфейсу имя.
- Ключ:
- Метрики :
- Ключ:
com.astromkey.extension.network_device.if.status
Описание: Метрика состояния, представляющая сетевой интерфейс, значение которой всегда равно 1, а её параметры указывают на детали состояния.
Дополнительные параметры (извлекаемые в виде атрибутов сущности): - Ключ:
oper.status
Применение: Рабочее состояние интерфейса (включен/выключен и т. д.). - Ключ:
admin.status
Применение: Административное состояние интерфейса (включено/выключено и т. д.). - Ключ:
if.speed
Применение: Скорость/пропускная способность интерфейса. - Ключ:
com.astromkey.extension.network_device.if.bytes_in.count
Описание: Объем трафика в байтах, входящий на сетевой интерфейс. - Ключ:
com.astromkey.extension.network_device.if.bytes_out.count
Описание: Объем трафика в байтах, исходящий с сетевого интерфейса.
- Ключ:
Что можно ожидать на этом этапе?
Это должно гарантировать корректное создание сущностей сетевого устройства, сетевого порта и сетевого интерфейса на основе ваших данных. На этом этапе вы можете использовать либо приложение Technologies, либо приложение Инфраструктура и операции для визуализации этих устройств.
- В приложении Technologies перейдите в
../ui/apps/astromkey.classic.technologies/ui/entity/list/network:interface - В приложении Инфраструктура и операции выберите вкладку Сетевые устройства.
Расширенное применение
В этом разделе, основываясь на предыдущих изменениях, рассматривается вопрос расширения сетевой модели за счет добавления дополнительных метрик, связей с существующими сущностями и настройки пользовательского интерфейса.
Во многих случаях у вас, вероятно, уже есть расширение или интеграция, которая отправляет специализированные данные о конкретном типе сетевого устройства. В таких ситуациях модель может быть использована для установления связей «аналогично» между существующими сущностями и общими, фактически добавляя к ним новые метрики, настраивая их атрибуты и внедряя некоторые из существующих диаграмм в их пользовательский интерфейс.
После внедрения предложенных изменений выполните следующие дополнительные шаги:
1. Подключите имеющиеся у вас данные к сетевому устройству:
- Создайте новую запись
topology.typesследующим образом:
| - name: network:device
enabled: true displayName: Network device rules: [] # You will populate this at the next step |
- Добавьте правила для привязки ваших данных к сущности (замените
[])
Примечание: Вы можете определить существующий тип сущности, похожий на сетевое устройство, и скопировать все правила из его определения.
Убедитесь, что каждое правило определяет следующее:
| - idPattern: network_device_{device.address}
instanceNamePattern: "{sys.name}" role: default |
Примечание: device.address и sys.name являются заполнителями, которые могут содержать любые другие параметры, но они должны указывать управляющий IP-адрес и имя устройства.
2. Подключите имеющиеся у вас данные к сетевому интерфейсу:
- Создайте новую запись
topology.typesследующим образом:
| - name: network:interface
enabled: true displayName: Network interface rules: [] # You will populate this in the next step |
- Добавьте правила для привязки ваших данных к сущности (замените приведенный выше код
[]).
Примечание: Вы можете определить существующий тип, похожий на сетевой интерфейс, и скопировать все правила из его определения.
Убедитесь, что каждое правило определяет следующее:
| - idPattern: network_interface_{mac.address}_{if.name}
instanceNamePattern: "{if.name}" role: default |
Примечание: mac.address и if.name являются заполнителями, которые могут содержать любые другие параметры, но они должны указывать MAC-адрес и имя интерфейса.
3. Изобразите отношения "same as":
- Создайте две записи в файле
topology.relationships. Каждая из них должна основываться на данных, аналогичных тем, которые вы использовали на предыдущих шагах.
| - fromType: "" # Add your existing entity type that resembles a network device
typeOfRelation: SAME_AS toType: `network:device` sources: - sourceType: Metrics condition: "" # Match any of the metrics that you used for the network:device entity rule - fromType: "" # Add your existing entity type that resembles a network interface typeOfRelation: SAME_AS toType: `network:interface` sources: - sourceType: Metrics condition: "" # Match any of the metrics that you used for the network:interface entity rule |
4. Настройте пользовательский интерфейс:
- Создайте новую запись
screensдля сетевого устройства:
| screens:
- entityType: network:device |
- Отобразите ссылку для детализации данных по специализированному объекту:
Добавьте свойство типа RELATION, указывающее на вашу существующую сущность propertiesCard.
| propertiesCard:
properties: - type: RELATION relation: # replace your_type with your existing entity type entitySelectorTemplate: type(your_type),fromRelationships.isSameAs($(entityConditions)) displayName: Linked entity conditions: # Replace your_type with your existing entity type - relatedEntity|entitySelectorTemplate=type(your_type),fromRelationships.isSameAs($(entityConditions)) # Ensures it only appears on monitored devices - entityAttribute|devMonitoringMode=Extension |
- Отобразите имеющиеся у вас диаграммы на экране сетевого устройства:
Самый простой способ — внедрить их по ссылке с экрана вашей существующей сущности.
Примечание: Никогда ничего не определяйте в detailsSettings, всегда в detailsInjections.
| detailsInjections:
- type: CHART_GROUP key: my-custom-chart # replace your_type with your existing entity type entitySelectorTemplate: type(your_type),fromRelationships.isSameAs($(entityConditions)) conditions: # Replace your_type with your existing entity type - relatedEntity|entitySelectorTemplate=type(your_type),fromRelationships.isSameAs($(entityConditions)) # Ensures it only appears on monitored devices - entityAttribute|devMonitoringMode=Extension |
- Создайте новые диаграммы для сетевого устройства:
| detailsInjections:
- type: CHART_GROUP key: my-custom-chart conditions: # Ensures it only appears on monitored devices - entityAttribute|devMonitoringMode=Extension chartsCards: - key: my-custom-chart type: CHART_GROUP # Rest of definition goes here... |
Что можно ожидать на этом этапе?
Объект сетевого устройства связан с расширенным набором метрик (полученных из специализированного расширения), сообщает о дополнительных атрибутах, отображает некоторые данные специализированного расширения на своей странице с подробными сведениями и сохраняет ссылку для детализации данных на специализированный объект.
Файлы манифеста
1_initial.yaml
Это неизмененное расширение.
Она отслеживает балансировщик нагрузки F5, отправляя данные в Ключ-АСТРОМ, но не имея представления о модели устройства.
1_initial.yaml
|
|---|
| name: custom:f5-load-balancer
version: 1.0.0 minastromkeyVersion: 1.289.0 author: name: astromkey snmp: - group: f5 interval: minutes: 1 dimensions: - key: instance.name value: oid:1.3.6.1.2.1.1.5.0 - key: failover.state value: oid:1.3.6.1.4.1.3375.2.1.14.3.1.0 - key: sync.state value: oid:1.3.6.1.4.1.3375.2.1.14.1.1.0 subgroups: - subgroup: f5-instance-details table: false dimensions: - key: instance.systemname value: oid:1.3.6.1.4.1.3375.2.1.6.1.0 - key: instance.systemrelease value: oid:1.3.6.1.4.1.3375.2.1.6.3.0 - key: instance.systemarch value: oid:1.3.6.1.4.1.3375.2.1.6.5.0 - key: instance.productversion value: oid:1.3.6.1.4.1.3375.2.1.4.2.0 metrics: - key: f5.lb.sys.uptime value: oid:1.3.6.1.4.1.3375.2.1.6.6.0 - subgroup: f5-interface-details featureSet: interface table: true dimensions: - key: interface.name value: oid:1.3.6.1.4.1.3375.2.1.2.4.1.2.1.1 - key: interface.enabled value: oid:1.3.6.1.4.1.3375.2.1.2.4.1.2.1.8 - key: interface.status value: oid:1.3.6.1.4.1.3375.2.1.2.4.1.2.1.17 - key: mac.address value: $networkFormat(const:macAddress, oid:1.3.6.1.4.1.3375.2.1.2.4.1.2.1.6) metrics: - key: f5.lb.sys.interface.status value: const:1 - subgroup: f5-interface-metrics featureSet: interface table: true dimensions: - key: interface.name value: oid:1.3.6.1.4.1.3375.2.1.2.4.4.3.1.1 metrics: - key: f5.lb.sys.interface.stat.bytes.in.count value: oid:1.3.6.1.4.1.3375.2.1.2.4.4.3.1.3 type: count - key: f5.lb.sys.interface.stat.bytes.out.count value: oid:1.3.6.1.4.1.3375.2.1.2.4.4.3.1.5 type: count - key: f5.lb.sys.interface.stat.pkts.in.count value: oid:1.3.6.1.4.1.3375.2.1.2.4.4.3.1.2 type: count - key: f5.lb.sys.interface.stat.pkts.out.count value: oid:1.3.6.1.4.1.3375.2.1.2.4.4.3.1.4 type: count - subgroup: f5-cpu table: false featureSet: instance-cpu metrics: - key: f5.lb.sys.global.host.cpu.idle1m value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.25.0 - key: f5.lb.sys.global.host.cpu.iowait1m value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.28.0 - key: f5.lb.sys.global.host.cpu.irq1m value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.26.0 - key: f5.lb.sys.global.host.cpu.softirq1min value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.27.0 - key: f5.lb.sys.global.host.cpu.stolen1m value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.40.0 - key: f5.lb.sys.global.host.cpu.system1m value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.24.0 - key: f5.lb.sys.global.host.cpu.user1m value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.22.0 - subgroup: f5-memory table: false featureSet: instance-memory metrics: - key: f5.lb.sys.host.memory.total value: oid:1.3.6.1.4.1.3375.2.1.7.1.1.0 - key: f5.lb.sys.host.memory.used value: oid:1.3.6.1.4.1.3375.2.1.7.1.2.0 topology: types: - name: f5lb:instance displayName: F5 BIG-IP Instance rules: - idPattern: f5_instance_{instance.name} instanceNamePattern: '{instance.name}' iconPattern: f5 sources: - sourceType: Metrics condition: $eq(f5.lb.sys.uptime) attributes: - key: dt.ip_addresses displayName: IP Address pattern: '{device.address}' - key: dt.dns_names displayName: DNS Name pattern: '{instance.name}' - key: OSRelease displayName: OS release pattern: '{instance.systemrelease}' - key: OSArchitecture displayName: OS architecture pattern: '{instance.systemarch}' - key: OSName displayName: OS name pattern: '{instance.systemname}' - key: ProductVersion displayName: Product version pattern: '{instance.productversion}' - key: FailoverStatus pattern: '{failover.state}' displayName: Failover status - key: SyncStatus pattern: '{sync.state}' displayName: Config sync status role: default - idPattern: f5_instance_{instance.name} instanceNamePattern: '{instance.name}' iconPattern: f5 sources: - sourceType: Metrics condition: $prefix(f5.lb) requiredDimensions: [] attributes: [] role: default - name: f5lb:interface displayName: F5 BIG-IP Interface rules: - idPattern: f5_interface_{instance.name}_{interface.name} instanceNamePattern: '{interface.name}' iconPattern: network-interfaces sources: - sourceType: Metrics condition: $eq(f5.lb.sys.interface.status) attributes: - key: EnabledState displayName: Enabled State pattern: '{interface.enabled}' - key: MacAddress displayName: MAC Address pattern: '{mac.address}' - key: Status displayName: Status pattern: '{interface.status}' role: default - idPattern: f5_interface_{instance.name}_{interface.name} instanceNamePattern: '{interface.name}' iconPattern: network-interfaces sources: - sourceType: Metrics condition: $prefix(f5.lb.sys.interface) requiredDimensions: [] attributes: [] role: default relationships: - fromType: f5lb:interface typeOfRelation: RUNS_ON toType: f5lb:instance sources: - sourceType: Metrics condition: $prefix(f5.lb.sys.interface) screens: - entityType: f5lb:instance detailsSettings: staticContent: showProblems: true showProperties: true showTags: true showGlobalFilter: true showAddTag: true target: BOTH layout: autoGenerate: false cards: - key: f5_instance-charts-cpu type: CHART_GROUP - key: f5_instance-charts-memory type: CHART_GROUP chartsCards: - key: f5_instance-charts-cpu target: BOTH mode: NORMAL displayName: CPU numberOfVisibleCharts: 4 chartsInRow: 4 charts: - displayName: CPU Breakdown visualizationType: GRAPH_CHART graphChartConfig: connectGaps: true stacked: true metrics: - metricSelector: f5.lb.sys.global.host.cpu.idle1m:splitBy("dt.entity.f5lb:instance") dqlQuery: timeseries idle1m=avg(f5.lb.sys.global.host.cpu.idle1m),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} visualization: displayName: Idle - metricSelector: f5.lb.sys.global.host.cpu.system1m:splitBy("dt.entity.f5lb:instance") dqlQuery: timeseries system1m=avg(f5.lb.sys.global.host.cpu.system1m),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} visualization: displayName: System - metricSelector: f5.lb.sys.global.host.cpu.user1m:splitBy("dt.entity.f5lb:instance") dqlQuery: timeseries user1m=avg(f5.lb.sys.global.host.cpu.user1m),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} visualization: displayName: User visualization: themeColor: DEFAULT seriesType: AREA - displayName: System CPU visualizationType: GRAPH_CHART graphChartConfig: connectGaps: true metrics: - metricSelector: f5.lb.sys.global.host.cpu.system1m:splitBy("dt.entity.f5lb:instance") dqlQuery: timeseries system1m=avg(f5.lb.sys.global.host.cpu.system1m),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} visualization: themeColor: BLUE seriesType: LINE - displayName: User CPU visualizationType: GRAPH_CHART graphChartConfig: connectGaps: true metrics: - metricSelector: f5.lb.sys.global.host.cpu.user1m:splitBy("dt.entity.f5lb:instance") dqlQuery: timeseries user1m=avg(f5.lb.sys.global.host.cpu.user1m),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} visualization: themeColor: BLUE seriesType: LINE - displayName: Idle CPU visualizationType: GRAPH_CHART graphChartConfig: connectGaps: true metrics: - metricSelector: f5.lb.sys.global.host.cpu.idle1m:splitBy("dt.entity.f5lb:instance") dqlQuery: timeseries idle1m=avg(f5.lb.sys.global.host.cpu.idle1m),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} visualization: themeColor: BLUE seriesType: LINE - key: f5_instance-charts-memory target: BOTH mode: NORMAL displayName: Memory numberOfVisibleCharts: 4 hideEmptyCharts: true charts: - displayName: Memory breakdown visualizationType: GRAPH_CHART graphChartConfig: connectGaps: true yAxes: - key: y-absolute position: LEFT visible: true - key: y-relative position: RIGHT visible: true min: '0' max: '100' metrics: - metricSelector: f5.lb.sys.host.memory.total:splitBy("dt.entity.f5lb:instance") dqlQuery: timeseries total=avg(f5.lb.sys.host.memory.total),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} yAxisKey: y-absolute visualization: themeColor: BLUE seriesType: AREA displayName: Total - metricSelector: f5.lb.sys.host.memory.used:splitBy("dt.entity.f5lb:instance") dqlQuery: timeseries used=avg(f5.lb.sys.host.memory.used),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} yAxisKey: y-absolute visualization: themeColor: ORANGE seriesType: AREA displayName: Used |
2_basic.yaml
Здесь представлены основные примеры использования.
Теперь Ключ-АСТРОМ распознает балансировщик нагрузки F5 как сетевое устройство с интерфейсами и портами. Другие приложения также будут его отображать.
2_basic.yaml
|
|---|
| name: custom:f5-load-balancer
version: 1.1.0 minastromkeyVersion: 1.289.0 author: name: astromkey # In this example, we add the basic metrics & dimensions for the network model. # We chose to spread them in-between the existing metrics where possible, but # they could just as well be extracted into separate groups & subgroups. snmp: - group: f5 interval: minutes: 1 dimensions: - key: instance.name value: oid:1.3.6.1.2.1.1.5.0 - key: failover.state value: oid:1.3.6.1.4.1.3375.2.1.14.3.1.0 - key: sync.state value: oid:1.3.6.1.4.1.3375.2.1.14.1.1.0 # Adding the mandatory dimensions here ensures they appear everywhere - key: monitoring.mode value: const:Extension - key: sys.name value: oid:1.3.6.1.2.1.1.5.0 - key: device.type value: const:F5 Load balancer subgroups: - subgroup: f5-instance-details table: false dimensions: - key: instance.systemname value: oid:1.3.6.1.4.1.3375.2.1.6.1.0 - key: instance.systemrelease value: oid:1.3.6.1.4.1.3375.2.1.6.3.0 - key: instance.systemarch value: oid:1.3.6.1.4.1.3375.2.1.6.5.0 - key: instance.productversion value: oid:1.3.6.1.4.1.3375.2.1.4.2.0 metrics: - key: f5.lb.sys.uptime value: oid:1.3.6.1.4.1.3375.2.1.6.6.0 - key: com.astromkey.extension.network_device.sysuptime value: oid:1.3.6.1.4.1.3375.2.1.6.6.0 - subgroup: f5-interface-details featureSet: interface table: true dimensions: - key: interface.name value: oid:1.3.6.1.4.1.3375.2.1.2.4.1.2.1.1 - key: if.name value: oid:1.3.6.1.4.1.3375.2.1.2.4.1.2.1.1 - key: interface.enabled value: oid:1.3.6.1.4.1.3375.2.1.2.4.1.2.1.8 - key: interface.status value: oid:1.3.6.1.4.1.3375.2.1.2.4.1.2.1.17 - key: mac.address value: $networkFormat(const:macAddress, oid:1.3.6.1.4.1.3375.2.1.2.4.1.2.1.6) metrics: - key: f5.lb.sys.interface.status value: const:1 - key: com.astromkey.extension.network_device.if.status value: const:1 - subgroup: f5-interface-metrics featureSet: interface table: true dimensions: - key: interface.name value: oid:1.3.6.1.4.1.3375.2.1.2.4.4.3.1.1 metrics: - key: f5.lb.sys.interface.stat.bytes.in.count value: oid:1.3.6.1.4.1.3375.2.1.2.4.4.3.1.3 type: count - key: f5.lb.sys.interface.stat.bytes.out.count value: oid:1.3.6.1.4.1.3375.2.1.2.4.4.3.1.5 type: count - key: com.astromkey.extension.network_device.if.bytes_in.count value: oid:1.3.6.1.4.1.3375.2.1.2.4.4.3.1.3 type: count - key: com.astromkey.extension.network_device.if.bytes_out.count value: oid:1.3.6.1.4.1.3375.2.1.2.4.4.3.1.5 type: count - key: f5.lb.sys.interface.stat.pkts.in.count value: oid:1.3.6.1.4.1.3375.2.1.2.4.4.3.1.2 type: count - key: f5.lb.sys.interface.stat.pkts.out.count value: oid:1.3.6.1.4.1.3375.2.1.2.4.4.3.1.4 type: count - subgroup: f5-cpu table: false featureSet: instance-cpu metrics: - key: com.astromkey.extension.network_device.cpu_usage value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.29.0 - key: f5.lb.sys.global.host.cpu.idle1m value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.25.0 - key: f5.lb.sys.global.host.cpu.iowait1m value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.28.0 - key: f5.lb.sys.global.host.cpu.irq1m value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.26.0 - key: f5.lb.sys.global.host.cpu.softirq1min value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.27.0 - key: f5.lb.sys.global.host.cpu.stolen1m value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.40.0 - key: f5.lb.sys.global.host.cpu.system1m value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.24.0 - key: f5.lb.sys.global.host.cpu.user1m value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.22.0 - subgroup: f5-memory table: false featureSet: instance-memory metrics: - key: f5.lb.sys.host.memory.total value: oid:1.3.6.1.4.1.3375.2.1.7.1.1.0 - key: f5.lb.sys.host.memory.used value: oid:1.3.6.1.4.1.3375.2.1.7.1.2.0 - key: com.astromkey.extension.network_device.memory_used value: oid:1.3.6.1.4.1.3375.2.1.7.1.4.0 - key: com.astromkey.extension.network_device.memory_total value: oid:1.3.6.1.4.1.3375.2.1.7.1.3.0 topology: types: - name: f5lb:instance displayName: F5 BIG-IP Instance rules: - idPattern: f5_instance_{instance.name} instanceNamePattern: '{instance.name}' iconPattern: f5 sources: - sourceType: Metrics condition: $eq(f5.lb.sys.uptime) attributes: - key: dt.ip_addresses displayName: IP Address pattern: '{device.address}' - key: dt.dns_names displayName: DNS Name pattern: '{instance.name}' - key: OSRelease displayName: OS release pattern: '{instance.systemrelease}' - key: OSArchitecture displayName: OS architecture pattern: '{instance.systemarch}' - key: OSName displayName: OS name pattern: '{instance.systemname}' - key: ProductVersion displayName: Product version pattern: '{instance.productversion}' - key: FailoverStatus pattern: '{failover.state}' displayName: Failover status - key: SyncStatus pattern: '{sync.state}' displayName: Config sync status role: default - idPattern: f5_instance_{instance.name} instanceNamePattern: '{instance.name}' iconPattern: f5 sources: - sourceType: Metrics condition: $prefix(f5.lb) requiredDimensions: [] attributes: [] role: default - name: f5lb:interface displayName: F5 BIG-IP Interface rules: - idPattern: f5_interface_{instance.name}_{interface.name} instanceNamePattern: '{interface.name}' iconPattern: network-interfaces sources: - sourceType: Metrics condition: $eq(f5.lb.sys.interface.status) attributes: - key: EnabledState displayName: Enabled State pattern: '{interface.enabled}' - key: MacAddress displayName: MAC Address pattern: '{mac.address}' - key: Status displayName: Status pattern: '{interface.status}' role: default - idPattern: f5_interface_{instance.name}_{interface.name} instanceNamePattern: '{interface.name}' iconPattern: network-interfaces sources: - sourceType: Metrics condition: $prefix(f5.lb.sys.interface) requiredDimensions: [] attributes: [] role: default relationships: - fromType: f5lb:interface typeOfRelation: RUNS_ON toType: f5lb:instance sources: - sourceType: Metrics condition: $prefix(f5.lb.sys.interface) screens: - entityType: f5lb:instance detailsSettings: staticContent: showProblems: true showProperties: true showTags: true showGlobalFilter: true showAddTag: true target: BOTH layout: autoGenerate: false cards: - key: f5_instance-charts-cpu type: CHART_GROUP - key: f5_instance-charts-memory type: CHART_GROUP chartsCards: - key: f5_instance-charts-cpu target: BOTH mode: NORMAL displayName: CPU numberOfVisibleCharts: 4 chartsInRow: 4 charts: - displayName: CPU Breakdown visualizationType: GRAPH_CHART graphChartConfig: connectGaps: true stacked: true metrics: - metricSelector: f5.lb.sys.global.host.cpu.idle1m:splitBy("dt.entity.f5lb:instance") dqlQuery: timeseries idle1m=avg(f5.lb.sys.global.host.cpu.idle1m),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} visualization: displayName: Idle - metricSelector: f5.lb.sys.global.host.cpu.system1m:splitBy("dt.entity.f5lb:instance") dqlQuery: timeseries system1m=avg(f5.lb.sys.global.host.cpu.system1m),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} visualization: displayName: System - metricSelector: f5.lb.sys.global.host.cpu.user1m:splitBy("dt.entity.f5lb:instance") dqlQuery: timeseries user1m=avg(f5.lb.sys.global.host.cpu.user1m),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} visualization: displayName: User visualization: themeColor: DEFAULT seriesType: AREA - displayName: System CPU visualizationType: GRAPH_CHART graphChartConfig: connectGaps: true metrics: - metricSelector: f5.lb.sys.global.host.cpu.system1m:splitBy("dt.entity.f5lb:instance") dqlQuery: timeseries system1m=avg(f5.lb.sys.global.host.cpu.system1m),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} visualization: themeColor: BLUE seriesType: LINE - displayName: User CPU visualizationType: GRAPH_CHART graphChartConfig: connectGaps: true metrics: - metricSelector: f5.lb.sys.global.host.cpu.user1m:splitBy("dt.entity.f5lb:instance") dqlQuery: timeseries user1m=avg(f5.lb.sys.global.host.cpu.user1m),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} visualization: themeColor: BLUE seriesType: LINE - displayName: Idle CPU visualizationType: GRAPH_CHART graphChartConfig: connectGaps: true metrics: - metricSelector: f5.lb.sys.global.host.cpu.idle1m:splitBy("dt.entity.f5lb:instance") dqlQuery: timeseries idle1m=avg(f5.lb.sys.global.host.cpu.idle1m),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} visualization: themeColor: BLUE seriesType: LINE - key: f5_instance-charts-memory target: BOTH mode: NORMAL displayName: Memory numberOfVisibleCharts: 4 hideEmptyCharts: true charts: - displayName: Memory breakdown visualizationType: GRAPH_CHART graphChartConfig: connectGaps: true yAxes: - key: y-absolute position: LEFT visible: true - key: y-relative position: RIGHT visible: true min: '0' max: '100' metrics: - metricSelector: f5.lb.sys.host.memory.total:splitBy("dt.entity.f5lb:instance") dqlQuery: timeseries total=avg(f5.lb.sys.host.memory.total),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} yAxisKey: y-absolute visualization: themeColor: BLUE seriesType: AREA displayName: Total - metricSelector: f5.lb.sys.host.memory.used:splitBy("dt.entity.f5lb:instance") dqlQuery: timeseries used=avg(f5.lb.sys.host.memory.used),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} yAxisKey: y-absolute visualization: themeColor: ORANGE seriesType: AREA displayName: Used |
3_advanced.yaml
Демонстрирует расширенные возможности использования.
Теперь сетевое устройство и интерфейс имеют доступ к большему объему данных. Сетевому устройству также были добавлены дополнительные атрибуты и диаграммы для отображения.
3_advanced.yaml
|
|---|
| name: custom:f5-load-balancer
version: 1.2.0 minastromkeyVersion: 1.289.0 author: name: astromkey # In this example, we add topology rules for customizing the network model. # And modify the screens to customize the UI of the network device. # All other changes done so far stay the same. snmp: - group: f5 interval: minutes: 1 dimensions: - key: instance.name value: oid:1.3.6.1.2.1.1.5.0 - key: failover.state value: oid:1.3.6.1.4.1.3375.2.1.14.3.1.0 - key: sync.state value: oid:1.3.6.1.4.1.3375.2.1.14.1.1.0 # Adding the mandatory dimensions here ensures they appear everywhere - key: monitoring.mode value: const:Extension - key: sys.name value: oid:1.3.6.1.2.1.1.5.0 - key: device.type value: const:F5 Load balancer subgroups: - subgroup: f5-instance-details table: false dimensions: - key: instance.systemname value: oid:1.3.6.1.4.1.3375.2.1.6.1.0 - key: instance.systemrelease value: oid:1.3.6.1.4.1.3375.2.1.6.3.0 - key: instance.systemarch value: oid:1.3.6.1.4.1.3375.2.1.6.5.0 - key: instance.productversion value: oid:1.3.6.1.4.1.3375.2.1.4.2.0 metrics: - key: f5.lb.sys.uptime value: oid:1.3.6.1.4.1.3375.2.1.6.6.0 - key: com.astromkey.extension.network_device.sysuptime value: oid:1.3.6.1.4.1.3375.2.1.6.6.0 - subgroup: f5-interface-details featureSet: interface table: true dimensions: - key: interface.name value: oid:1.3.6.1.4.1.3375.2.1.2.4.1.2.1.1 - key: if.name value: oid:1.3.6.1.4.1.3375.2.1.2.4.1.2.1.1 - key: interface.enabled value: oid:1.3.6.1.4.1.3375.2.1.2.4.1.2.1.8 - key: interface.status value: oid:1.3.6.1.4.1.3375.2.1.2.4.1.2.1.17 - key: mac.address value: $networkFormat(const:macAddress, oid:1.3.6.1.4.1.3375.2.1.2.4.1.2.1.6) metrics: - key: f5.lb.sys.interface.status value: const:1 - key: com.astromkey.extension.network_device.if.status value: const:1 - subgroup: f5-interface-metrics featureSet: interface table: true dimensions: - key: interface.name value: oid:1.3.6.1.4.1.3375.2.1.2.4.4.3.1.1 metrics: - key: f5.lb.sys.interface.stat.bytes.in.count value: oid:1.3.6.1.4.1.3375.2.1.2.4.4.3.1.3 type: count - key: f5.lb.sys.interface.stat.bytes.out.count value: oid:1.3.6.1.4.1.3375.2.1.2.4.4.3.1.5 type: count - key: com.astromkey.extension.network_device.if.bytes_in.count value: oid:1.3.6.1.4.1.3375.2.1.2.4.4.3.1.3 type: count - key: com.astromkey.extension.network_device.if.bytes_out.count value: oid:1.3.6.1.4.1.3375.2.1.2.4.4.3.1.5 type: count - key: f5.lb.sys.interface.stat.pkts.in.count value: oid:1.3.6.1.4.1.3375.2.1.2.4.4.3.1.2 type: count - key: f5.lb.sys.interface.stat.pkts.out.count value: oid:1.3.6.1.4.1.3375.2.1.2.4.4.3.1.4 type: count - subgroup: f5-cpu table: false featureSet: instance-cpu metrics: - key: com.astromkey.extension.network_device.cpu_usage value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.29.0 - key: f5.lb.sys.global.host.cpu.idle1m value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.25.0 - key: f5.lb.sys.global.host.cpu.iowait1m value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.28.0 - key: f5.lb.sys.global.host.cpu.irq1m value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.26.0 - key: f5.lb.sys.global.host.cpu.softirq1min value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.27.0 - key: f5.lb.sys.global.host.cpu.stolen1m value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.40.0 - key: f5.lb.sys.global.host.cpu.system1m value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.24.0 - key: f5.lb.sys.global.host.cpu.user1m value: oid:1.3.6.1.4.1.3375.2.1.1.2.20.22.0 - subgroup: f5-memory table: false featureSet: instance-memory metrics: - key: f5.lb.sys.host.memory.total value: oid:1.3.6.1.4.1.3375.2.1.7.1.1.0 - key: f5.lb.sys.host.memory.used value: oid:1.3.6.1.4.1.3375.2.1.7.1.2.0 - key: com.astromkey.extension.network_device.memory_used value: oid:1.3.6.1.4.1.3375.2.1.7.1.4.0 - key: com.astromkey.extension.network_device.memory_total value: oid:1.3.6.1.4.1.3375.2.1.7.1.3.0 topology: types: # These are already existing rules which we can copy & adjust - name: f5lb:instance # Closely resembles a network device displayName: F5 BIG-IP Instance rules: - idPattern: f5_instance_{instance.name} instanceNamePattern: '{instance.name}' iconPattern: f5 sources: - sourceType: Metrics condition: $eq(f5.lb.sys.uptime) attributes: - key: dt.ip_addresses displayName: IP Address pattern: '{device.address}' - key: dt.dns_names displayName: DNS Name pattern: '{instance.name}' - key: OSRelease displayName: OS release pattern: '{instance.systemrelease}' - key: OSArchitecture displayName: OS architecture pattern: '{instance.systemarch}' - key: OSName displayName: OS name pattern: '{instance.systemname}' - key: ProductVersion displayName: Product version pattern: '{instance.productversion}' - key: FailoverStatus pattern: '{failover.state}' displayName: Failover status - key: SyncStatus pattern: '{sync.state}' displayName: Config sync status role: default - idPattern: f5_instance_{instance.name} instanceNamePattern: '{instance.name}' iconPattern: f5 sources: - sourceType: Metrics condition: $prefix(f5.lb) requiredDimensions: [] attributes: [] role: default - name: f5lb:interface # Closely resembles a network interface displayName: F5 BIG-IP Interface rules: - idPattern: f5_interface_{instance.name}_{interface.name} instanceNamePattern: '{interface.name}' iconPattern: network-interfaces sources: - sourceType: Metrics condition: $eq(f5.lb.sys.interface.status) attributes: - key: EnabledState displayName: Enabled State pattern: '{interface.enabled}' - key: MacAddress displayName: MAC Address pattern: '{mac.address}' - key: Status displayName: Status pattern: '{interface.status}' role: default - idPattern: f5_interface_{instance.name}_{interface.name} instanceNamePattern: '{interface.name}' iconPattern: network-interfaces sources: - sourceType: Metrics condition: $prefix(f5.lb.sys.interface) requiredDimensions: [] attributes: [] role: default # These are new rules added to customize the model - name: network:device enabled: true displayName: Network device rules: - idPattern: network_device_{device.address} # must follow `network_device_{...}` pattern instanceNamePattern: '{instance.name}' iconPattern: f5 sources: - sourceType: Metrics condition: $eq(f5.lb.sys.uptime) # It's important to target specialized metrics, not the generic ones attributes: - key: dt.ip_addresses displayName: IP Address pattern: '{device.address}' - key: dt.dns_names displayName: DNS Name pattern: '{instance.name}' - key: OSRelease displayName: OS release pattern: '{instance.systemrelease}' - key: OSArchitecture displayName: OS architecture pattern: '{instance.systemarch}' - key: OSName displayName: OS name pattern: '{instance.systemname}' - key: ProductVersion displayName: Product version pattern: '{instance.productversion}' - key: FailoverStatus pattern: '{failover.state}' displayName: Failover status - key: SyncStatus pattern: '{sync.state}' displayName: Config sync status role: default - idPattern: network_device_{device.address} instanceNamePattern: '{instance.name}' iconPattern: f5 sources: - sourceType: Metrics condition: $prefix(f5.lb) requiredDimensions: [] attributes: [] role: default - name: network:interface enabled: true displayName: Network interface rules: - idPattern: network_interface_{mac.address}_{interface.name} # must follow `network_interface_{...}_{...}` pattern instanceNamePattern: '{interface.name}' iconPattern: network-interfaces sources: - sourceType: Metrics condition: $eq(f5.lb.sys.interface.status) # Again, we target specialized metrics, not generic ones attributes: - key: EnabledState displayName: Enabled State pattern: '{interface.enabled}' - key: MacAddress displayName: MAC Address pattern: '{mac.address}' - key: ifOperStatus displayName: Operational status pattern: '{interface.status}' role: default - idPattern: network_interface_{mac.address}_{interface.name} instanceNamePattern: '{interface.name}' iconPattern: network-interfaces sources: - sourceType: Metrics condition: $prefix(f5.lb.sys.interface) requiredDimensions: [] attributes: [] role: default relationships: - fromType: f5lb:interface typeOfRelation: RUNS_ON toType: f5lb:instance sources: - sourceType: Metrics condition: $prefix(f5.lb.sys.interface) # Adding the same as relationships - fromType: f5lb:interface typeOfRelation: SAME_AS toType: network:interface sources: - sourceType: Metrics condition: $prefix(f5.lb.sys.interface) - fromType: f5lb:instance typeOfRelation: SAME_AS toType: network:device sources: - sourceType: Metrics condition: $prefix(f5.lb) screens: # Customizing the screen for the network device - entityType: network:device propertiesCard: properties: # Show a link to the specialized entity - type: RELATION relation: entitySelectorTemplate: type(f5lb:instance),fromRelationships.isSameAs($(entityConditions)) displayName: F5 Load balancer conditions: # Apply only to devices that have a same as relation, who are monitored by Extension # These 2 conditions are used althroughout the screen definition - relatedEntity|entitySelectorTemplate=type(f5lb:instance),fromRelationships.isSameAs($(entityConditions)) - entityAttribute|devMonitoringMode=Extension # Must define everything in `detailsInjections` and not `detailsSettings`! detailsInjections: # This card is injected by reference, meaning we don't have to duplicate the definition again - type: CHART_GROUP key: f5_instance-charts-cpu # When using `entitySelectorTemplate`, the card is understood to be defined as part of the # resolved entity's screen definition, and not the current screen definition. entitySelectorTemplate: type(f5lb:instance),fromRelationships.isSameAs($(entityConditions)) conditions: - relatedEntity|entitySelectorTemplate=type(f5lb:instance),fromRelationships.isSameAs($(entityConditions)) - entityAttribute|devMonitoringMode=Extension # Of course, full definitions are still supported - type: CHART_GROUP key: network-interfaces-list chartsCards: - key: network-interfaces-list mode: NORMAL target: BOTH # Use CLASSIC for Managed, PLATFORM for SaaS, or BOTH for both displayName: Traffic numberOfVisibleCharts: 1 conditions: # Even if your card is generic, you should still apply this condition so that only # monitored devices display the card. - entityAttribute|devMonitoringMode=Extension charts: - displayName: Traffic in/out visualizationType: GRAPH_CHART graphChartConfig: metrics: # metricSelector is required for Managed - metricSelector: com.astromkey.extension.network_device.if.bytes_in.count:splitBy("dt.entity.network:device) # dqlQuery is required for SaaS dqlQuery: timeseries bytesIn=avg(com.astromkey.extension.network_device.if.bytes_in.count),by:{`dt.entity.network:device`},filter:{`dt.entity.network:device`==$(entityId)} visualization: displayName: Bytes In - metricSelector: com.astromkey.extension.network_device.if.bytes_out.count:splitBy("dt.entity.network:device") dqlQuery: timeseries bytesOut=avg(com.astromkey.extension.network_device.if.bytes_out.count),by:{`dt.entity.network:device`},filter:{`dt.entity.network:device`==$(entityId)} visualization: displayName: Bytes Out - entityType: f5lb:instance detailsSettings: staticContent: showProblems: true showProperties: true showTags: true showGlobalFilter: true showAddTag: true target: BOTH layout: autoGenerate: false cards: - key: f5_instance-charts-cpu type: CHART_GROUP - key: f5_instance-charts-memory type: CHART_GROUP chartsCards: - key: f5_instance-charts-cpu target: BOTH mode: NORMAL displayName: CPU numberOfVisibleCharts: 4 chartsInRow: 4 charts: - displayName: CPU Breakdown visualizationType: GRAPH_CHART graphChartConfig: connectGaps: true stacked: true metrics: - metricSelector: f5.lb.sys.global.host.cpu.idle1m:splitBy("dt.entity.f5lb:instance") dqlQuery: timeseries idle1m=avg(f5.lb.sys.global.host.cpu.idle1m),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} visualization: displayName: Idle - metricSelector: f5.lb.sys.global.host.cpu.system1m:splitBy("dt.entity.f5lb:instance") dqlQuery: timeseries system1m=avg(f5.lb.sys.global.host.cpu.system1m),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} visualization: displayName: System - metricSelector: f5.lb.sys.global.host.cpu.user1m:splitBy("dt.entity.f5lb:instance") dqlQuery: timeseries user1m=avg(f5.lb.sys.global.host.cpu.user1m),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} visualization: displayName: User visualization: themeColor: DEFAULT seriesType: AREA - displayName: System CPU visualizationType: GRAPH_CHART graphChartConfig: connectGaps: true metrics: - metricSelector: f5.lb.sys.global.host.cpu.system1m:splitBy("dt.entity.f5lb:instance") dqlQuery: timeseries system1m=avg(f5.lb.sys.global.host.cpu.system1m),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} visualization: themeColor: BLUE seriesType: LINE - displayName: User CPU visualizationType: GRAPH_CHART graphChartConfig: connectGaps: true metrics: - metricSelector: f5.lb.sys.global.host.cpu.user1m:splitBy("dt.entity.f5lb:instance") dqlQuery: timeseries user1m=avg(f5.lb.sys.global.host.cpu.user1m),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} visualization: themeColor: BLUE seriesType: LINE - displayName: Idle CPU visualizationType: GRAPH_CHART graphChartConfig: connectGaps: true metrics: - metricSelector: f5.lb.sys.global.host.cpu.idle1m:splitBy("dt.entity.f5lb:instance") dqlQuery: timeseries idle1m=avg(f5.lb.sys.global.host.cpu.idle1m),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} visualization: themeColor: BLUE seriesType: LINE - key: f5_instance-charts-memory target: BOTH mode: NORMAL displayName: Memory numberOfVisibleCharts: 4 hideEmptyCharts: true charts: - displayName: Memory breakdown visualizationType: GRAPH_CHART graphChartConfig: connectGaps: true yAxes: - key: y-absolute position: LEFT visible: true - key: y-relative position: RIGHT visible: true min: '0' max: '100' metrics: - metricSelector: f5.lb.sys.host.memory.total:splitBy("dt.entity.f5lb:instance") dqlQuery: timeseries total=avg(f5.lb.sys.host.memory.total),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} yAxisKey: y-absolute visualization: themeColor: BLUE seriesType: AREA displayName: Total - metricSelector: f5.lb.sys.host.memory.used:splitBy("dt.entity.f5lb:instance") dqlQuery: timeseries used=avg(f5.lb.sys.host.memory.used),by:{`dt.entity.f5lb:instance`},filter:{`dt.entity.f5lb:instance`==$(entityId)} yAxisKey: y-absolute visualization: themeColor: ORANGE seriesType: AREA displayName: Used |