基于ZABBIX监控 RabbitMQ服务开箱模板汉化及适用性改造

embedded/2024/12/23 1:19:22/

概述:

因为工作的需要,要监控RabbitMQ的状态,看到zabbix里面自带开箱模板,就直接套用,但是发现很多监控项及LLD jsonpath的问题,导致无法使用,自己重新开发耗时耗力,便想着边研究边解决,本文将贴出zabbix原版的模板文件及部分适用性改造例子,并附上最终完善及汉化后的模板。

实验环境:

Zabbix 6.4(192.168.1.1)
RabbitMQ 3.6.14(192.168.1.2)
模板名:RabbitMQ node by Zabbix agent

参考资料:

zabbix模板相关:https://www.zabbix.com/cn/integrations/rabbitmq#rabbitmq_agent

Rabbitmq接口文档:https://www.rabbitmq.com/docs/monitoring#queue-metrics

ZABBIX监控RabbitMQ服务原版开箱模板

zabbix_export:version: '6.0'date: '2024-10-09T02:10:07Z'groups:-uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6name: Templates/Applicationstemplates:-uuid: d5dc11ae9ab143a89c4be534bbb35188template: 'RabbitMQ node by Zabbix agent'name: 'RabbitMQ node by Zabbix agent'description: |Get node metrics from RabbitMQ management plugin provided an HTTP-based API using Zabbix agent.You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/387226-discussion-thread-for-official-zabbix-template-rabbitmqTemplate tooling version used: 0.41groups:-name: Templates/Applicationsitems:-uuid: b1f191f9077f4382b5b87e0085ae2622name: 'RabbitMQ: Service response time'key: 'net.tcp.service.perf["{$RABBITMQ.API.SCHEME}","{$RABBITMQ.API.HOST}","{$RABBITMQ.API.PORT}"]'history: 7dvalue_type: FLOATunits: stags:-tag: componentvalue: systemtriggers:-uuid: 5cb80a7552d74e44a83d0825f039f89fexpression: 'min(/RabbitMQ node by Zabbix agent/net.tcp.service.perf["{$RABBITMQ.API.SCHEME}","{$RABBITMQ.API.HOST}","{$RABBITMQ.API.PORT}"],5m)>{$RABBITMQ.RESPONSE_TIME.MAX.WARN}'name: 'RabbitMQ: Service response time is too high (over {$RABBITMQ.RESPONSE_TIME.MAX.WARN}s for 5m)'priority: WARNINGmanual_close: 'YES'dependencies:-name: 'RabbitMQ: Process is not running'expression: 'last(/RabbitMQ node by Zabbix agent/proc.num["{$RABBITMQ.PROCESS_NAME}"])=0'-name: 'RabbitMQ: Service is down'expression: 'last(/RabbitMQ node by Zabbix agent/net.tcp.service["{$RABBITMQ.API.SCHEME}","{$RABBITMQ.API.HOST}","{$RABBITMQ.API.PORT}"])=0'tags:-tag: scopevalue: performance-uuid: 6229b623f5ff40f9a65e9573b3b86e3fname: 'RabbitMQ: Service ping'key: 'net.tcp.service["{$RABBITMQ.API.SCHEME}","{$RABBITMQ.API.HOST}","{$RABBITMQ.API.PORT}"]'history: 7dvaluemap:name: 'Service state'preprocessing:-type: DISCARD_UNCHANGED_HEARTBEATparameters:- 10mtags:-tag: componentvalue: health-tag: componentvalue: networktriggers:-uuid: af5cfb0004e04562a9720b9e1b41fd5bexpression: 'last(/RabbitMQ node by Zabbix agent/net.tcp.service["{$RABBITMQ.API.SCHEME}","{$RABBITMQ.API.HOST}","{$RABBITMQ.API.PORT}"])=0'name: 'RabbitMQ: Service is down'priority: AVERAGEmanual_close: 'YES'dependencies:-name: 'RabbitMQ: Process is not running'expression: 'last(/RabbitMQ node by Zabbix agent/proc.num["{$RABBITMQ.PROCESS_NAME}"])=0'tags:-tag: scopevalue: availability-uuid: 0b195bf594c44b1f869b4a7671f61453name: 'RabbitMQ: CPU utilization'key: 'proc.cpu.util["{$RABBITMQ.PROCESS_NAME}"]'history: 7dvalue_type: FLOATunits: '%'description: 'Process CPU utilization percentage.'tags:-tag: componentvalue: cpu-uuid: 6f13f672d8ce4c9592e0f3f5ec3b0ec4name: 'RabbitMQ: Memory usage (rss)'key: 'proc.mem["{$RABBITMQ.PROCESS_NAME}",,,,rss]'history: 7dunits: Bdescription: 'Resident set size memory used by process in bytes.'tags:-tag: componentvalue: system-uuid: 4faac75027d14304ab071602df8f2937name: 'RabbitMQ: Memory usage (vsize)'key: 'proc.mem["{$RABBITMQ.PROCESS_NAME}",,,,vsize]'history: 7dunits: Bdescription: 'Virtual memory size used by process in bytes.'tags:-tag: componentvalue: memory-uuid: 8f1c8d2449c44ab590842184d9deb3a6name: 'RabbitMQ: Number of processes running'key: 'proc.num["{$RABBITMQ.PROCESS_NAME}"]'history: 7dtags:-tag: componentvalue: systemtriggers:-uuid: 2979bc7d779b404696f7eac273e99ea7expression: 'last(/RabbitMQ node by Zabbix agent/proc.num["{$RABBITMQ.PROCESS_NAME}"])=0'name: 'RabbitMQ: Process is not running'priority: HIGHtags:-tag: scopevalue: availability-uuid: 7dad79be93bd46bba7a2540b38080b06name: 'RabbitMQ: Free disk space'type: DEPENDENTkey: rabbitmq.node.disk_freedelay: '0'history: 7dunits: Bdescription: 'Current free disk space'preprocessing:-type: JSONPATHparameters:- $.disk_freemaster_item:key: 'web.page.get["{$RABBITMQ.API.SCHEME}://{$RABBITMQ.API.USER}:{$RABBITMQ.API.PASSWORD}@{$RABBITMQ.API.HOST}:{$RABBITMQ.API.PORT}/api/nodes/{$RABBITMQ.CLUSTER.NAME}@{HOST.NAME}?memory=true"]'tags:-tag: componentvalue: storage-uuid: d8de1eb13f024ce99388fc4bb68d6ad0name: 'RabbitMQ: Disk free alarm'type: DEPENDENTkey: rabbitmq.node.disk_free_alarmdelay: '0'history: 7ddescription: 'Does the node have disk alarm'valuemap:name: 'Alarm state'preprocessing:-type: JSONPATHparameters:- $.disk_free_alarm-type: BOOL_TO_DECIMALparameters:- ''master_item:key: 'web.page.get["{$RABBITMQ.API.SCHEME}://{$RABBITMQ.API.USER}:{$RABBITMQ.API.PASSWORD}@{$RABBITMQ.API.HOST}:{$RABBITMQ.API.PORT}/api/nodes/{$RABBITMQ.CLUSTER.NAME}@{HOST.NAME}?memory=true"]'tags:-tag: componentvalue: storagetriggers:-uuid: b68cb12ecd4046fd80a717fb557f04e8expression: 'last(/RabbitMQ node by Zabbix agent/rabbitmq.node.disk_free_alarm)=1'name: 'RabbitMQ: Free disk space alarm (Free space threshold has been reached)'opdata: 'Current state: {ITEM.LASTVALUE1}'priority: AVERAGEdescription: 'https://www.rabbitmq.com/disk-alarms.html'tags:-tag: scopevalue: performance-uuid: 4e62b476bd11497f9190d1f720f22f75name: 'RabbitMQ: Disk free limit'type: DEPENDENTkey: rabbitmq.node.disk_free_limitdelay: '0'history: 7dunits: Bdescription: 'Disk free space limit in bytes'preprocessing:-type: JSONPATHparameters:- $.disk_free_limitmaster_item:key: 'web.page.get["{$RABBITMQ.API.SCHEME}://{$RABBITMQ.API.USER}:{$RABBITMQ.API.PASSWORD}@{$RABBITMQ.API.HOST}:{$RABBITMQ.API.PORT}/api/nodes/{$RABBITMQ.CLUSTER.NAME}@{HOST.NAME}?memory=true"]'tags:-tag: componentvalue: storage-uuid: 09aeab86c69846eb82d27c2f82f46d2bname: 'RabbitMQ: Used file descriptors'type: DEPENDENTkey: rabbitmq.node.fd_useddelay: '0'history: 7ddescription: 'Used file descriptors'preprocessing:-type: JSONPATHparameters:- $.fd_usedmaster_item:key: 'web.page.get["{$RABBITMQ.API.SCHEME}://{$RABBITMQ.API.USER}:{$RABBITMQ.API.PASSWORD}@{$RABBITMQ.API.HOST}:{$RABBITMQ.API.PORT}/api/nodes/{$RABBITMQ.CLUSTER.NAME}@{HOST.NAME}?memory=true"]'tags:-tag: componentvalue: storage-uuid: e059b278ba384133a72dc723c2b2c40bname: 'RabbitMQ: Memory alarm'type: DEPENDENTkey: rabbitmq.node.mem_alarmdelay: '0'history: 7ddescription: 'Does the host has memory alarm'valuemap:name: 'Alarm state'preprocessing:-type: JSONPATHparameters:- $.mem_alarm-type: BOOL_TO_DECIMALparameters:- ''master_item:key: 'web.page.get["{$RABBITMQ.API.SCHEME}://{$RABBITMQ.API.USER}:{$RABBITMQ.API.PASSWORD}@{$RABBITMQ.API.HOST}:{$RABBITMQ.API.PORT}/api/nodes/{$RABBITMQ.CLUSTER.NAME}@{HOST.NAME}?memory=true"]'tags:-tag: componentvalue: memorytriggers:-uuid: ec6ae727fe774b0fa56bb4d9ad773e35expression: 'last(/RabbitMQ node by Zabbix agent/rabbitmq.node.mem_alarm)=1'name: 'RabbitMQ: Memory alarm (Memory usage threshold has been reached)'opdata: 'Current state: {ITEM.LASTVALUE1}'priority: AVERAGEdescription: 'https://www.rabbitmq.com/memory.html'tags:-tag: scopevalue: performance-uuid: 54bd4a47d635444e8e2e955325dbb976name: 'RabbitMQ: Memory limit'type: DEPENDENTkey: rabbitmq.node.mem_limitdelay: '0'history: 7dunits: Bdescription: 'Memory usage high watermark in bytes'preprocessing:-type: JSONPATHparameters:- $.mem_limitmaster_item:key: 'web.page.get["{$RABBITMQ.API.SCHEME}://{$RABBITMQ.API.USER}:{$RABBITMQ.API.PASSWORD}@{$RABBITMQ.API.HOST}:{$RABBITMQ.API.PORT}/api/nodes/{$RABBITMQ.CLUSTER.NAME}@{HOST.NAME}?memory=true"]'tags:-tag: componentvalue: memory-uuid: d6a01ec409a6449986c5c0a81ffaf914name: 'RabbitMQ: Memory used'type: DEPENDENTkey: rabbitmq.node.mem_useddelay: '0'history: 7dunits: Bdescription: 'Memory used in bytes'preprocessing:-type: JSONPATHparameters:- $.mem_usedmaster_item:key: 'web.page.get["{$RABBITMQ.API.SCHEME}://{$RABBITMQ.API.USER}:{$RABBITMQ.API.PASSWORD}@{$RABBITMQ.API.HOST}:{$RABBITMQ.API.PORT}/api/nodes/{$RABBITMQ.CLUSTER.NAME}@{HOST.NAME}?memory=true"]'tags:-tag: componentvalue: memory-uuid: db91f84a5ad7412c959fbfe4e3b6df88name: 'RabbitMQ: Management plugin version'type: DEPENDENTkey: rabbitmq.node.overview.management_versiondelay: '0'history: 7dtrends: '0'value_type: CHARdescription: 'Version of the management plugin in use'preprocessing:-type: JSONPATHparameters:- $.management_version-type: DISCARD_UNCHANGED_HEARTBEATparameters:- 1dmaster_item:key: 'web.page.get["{$RABBITMQ.API.SCHEME}://{$RABBITMQ.API.USER}:{$RABBITMQ.API.PASSWORD}@{$RABBITMQ.API.HOST}:{$RABBITMQ.API.PORT}/api/overview"]'tags:-tag: componentvalue: system-uuid: 52a0be5049ee40748761d301a644315bname: 'RabbitMQ: RabbitMQ version'type: DEPENDENTkey: rabbitmq.node.overview.rabbitmq_versiondelay: '0'history: 7dtrends: '0'value_type: CHARdescription: 'Version of RabbitMQ on the node which processed this request'preprocessing:-type: JSONPATHparameters:- $.rabbitmq_version-type: DISCARD_UNCHANGED_HEARTBEATparameters:- 1dmaster_item:key: 'web.page.get["{$RABBITMQ.API.SCHEME}://{$RABBITMQ.API.USER}:{$RABBITMQ.API.PASSWORD}@{$RABBITMQ.API.HOST}:{$RABBITMQ.API.PORT}/api/overview"]'tags:-tag: componentvalue: systemtriggers:-uuid: daf98bb4593d4697bc51423b2f65ba41expression: 'last(/RabbitMQ node by Zabbix agent/rabbitmq.node.overview.rabbitmq_version,#1)<>last(/RabbitMQ node by Zabbix agent/rabbitmq.node.overview.rabbitmq_version,#2) and length(last(/RabbitMQ node by Zabbix agent/rabbitmq.node.overview.rabbitmq_version))>0'name: 'RabbitMQ: Version has changed (new version: {ITEM.VALUE})'priority: INFOdescription: 'RabbitMQ version has changed. Ack to close.'manual_close: 'YES'tags:-tag: scopevalue: notice-uuid: 5e8c1ed0b073461eb14477edac3c756aname: 'RabbitMQ: Number of network partitions'type: DEPENDENTkey: rabbitmq.node.partitionsdelay: '0'history: 7ddescription: 'Number of network partitions this node is seeing'preprocessing:-type: JSONPATHparameters:- $.partitions-type: JAVASCRIPTparameters:- 'return JSON.parse(value).length;'master_item:key: 'web.page.get["{$RABBITMQ.API.SCHEME}://{$RABBITMQ.API.USER}:{$RABBITMQ.API.PASSWORD}@{$RABBITMQ.API.HOST}:{$RABBITMQ.API.PORT}/api/nodes/{$RABBITMQ.CLUSTER.NAME}@{HOST.NAME}?memory=true"]'tags:-tag: componentvalue: networktriggers:-uuid: 5bed266725e94000804b0ecc7bce6209expression: 'min(/RabbitMQ node by Zabbix agent/rabbitmq.node.partitions,5m)>0'name: 'RabbitMQ: Number of network partitions is too high (more than 0 for 5m)'opdata: 'Current value: {ITEM.LASTVALUE1}'priority: WARNINGdescription: 'https://www.rabbitmq.com/partitions.html#detecting'tags:-tag: scopevalue: performance-uuid: 087fcb3992ef4e35bacd4b6e69ef93d3name: 'RabbitMQ: Is running'type: DEPENDENTkey: rabbitmq.node.runningdelay: '0'history: 7ddescription: 'Is the node running or not'valuemap:name: 'Service state'preprocessing:-type: JSONPATHparameters:- $.running-type: BOOL_TO_DECIMALparameters:- ''master_item:key: 'web.page.get["{$RABBITMQ.API.SCHEME}://{$RABBITMQ.API.USER}:{$RABBITMQ.API.PASSWORD}@{$RABBITMQ.API.HOST}:{$RABBITMQ.API.PORT}/api/nodes/{$RABBITMQ.CLUSTER.NAME}@{HOST.NAME}?memory=true"]'tags:-tag: componentvalue: systemtriggers:-uuid: 253acf98446e4790975b330d44dd6b96expression: 'max(/RabbitMQ node by Zabbix agent/rabbitmq.node.running,5m)=0'name: 'RabbitMQ: Node is not running'opdata: 'Current state: {ITEM.LASTVALUE1}'priority: AVERAGEdescription: 'RabbitMQ node is not running'dependencies:-name: 'RabbitMQ: Process is not running'expression: 'last(/RabbitMQ node by Zabbix agent/proc.num["{$RABBITMQ.PROCESS_NAME}"])=0'-name: 'RabbitMQ: Service is down'expression: 'last(/RabbitMQ node by Zabbix agent/net.tcp.service["{$RABBITMQ.API.SCHEME}","{$RABBITMQ.API.HOST}","{$RABBITMQ.API.PORT}"])=0'tags:-tag: scopevalue: availability-uuid: 1ae6f429e99d4ddaa54aa6adab6b8100name: 'RabbitMQ: Runtime run queue'type: DEPENDENTkey: rabbitmq.node.run_queuedelay: '0'history: 7ddescription: 'Average number of Erlang processes waiting to run'preprocessing:-type: JSONPATHparameters:- $.run_queuemaster_item:key: 'web.page.get["{$RABBITMQ.API.SCHEME}://{$RABBITMQ.API.USER}:{$RABBITMQ.API.PASSWORD}@{$RABBITMQ.API.HOST}:{$RABBITMQ.API.PORT}/api/nodes/{$RABBITMQ.CLUSTER.NAME}@{HOST.NAME}?memory=true"]'tags:-tag: componentvalue: system-uuid: 3aa508520f224150a05a7ebb64d22c5ename: 'RabbitMQ: Sockets available'type: DEPENDENTkey: rabbitmq.node.sockets_totaldelay: '0'history: 7ddescription: 'File descriptors available for use as sockets'preprocessing:-type: JSONPATHparameters:- $.sockets_totalmaster_item:key: 'web.page.get["{$RABBITMQ.API.SCHEME}://{$RABBITMQ.API.USER}:{$RABBITMQ.API.PASSWORD}@{$RABBITMQ.API.HOST}:{$RABBITMQ.API.PORT}/api/nodes/{$RABBITMQ.CLUSTER.NAME}@{HOST.NAME}?memory=true"]'tags:-tag: componentvalue: system-uuid: de2cbe02ff6c47d78b6c7105709f4805name: 'RabbitMQ: Sockets used'type: DEPENDENTkey: rabbitmq.node.sockets_useddelay: '0'history: 7ddescription: 'Number of file descriptors used as sockets'preprocessing:-type: JSONPATHparameters:- $.sockets_usedmaster_item:key: 'web.page.get["{$RABBITMQ.API.SCHEME}://{$RABBITMQ.API.USER}:{$RABBITMQ.API.PASSWORD}@{$RABBITMQ.API.HOST}:{$RABBITMQ.API.PORT}/api/nodes/{$RABBITMQ.CLUSTER.NAME}@{HOST.NAME}?memory=true"]'tags:-tag: componentvalue: system-uuid: a28b6c8cca5544b79c2d9946c1978c7ename: 'RabbitMQ: Uptime'type: DEPENDENTkey: rabbitmq.node.uptimedelay: '0'history: 7dvalue_type: FLOATunits: sdescription: 'Uptime in milliseconds'preprocessing:-type: JSONPATHparameters:- $.uptime-type: MULTIPLIERparameters:- '0.001'master_item:key: 'web.page.get["{$RABBITMQ.API.SCHEME}://{$RABBITMQ.API.USER}:{$RABBITMQ.API.PASSWORD}@{$RABBITMQ.API.HOST}:{$RABBITMQ.API.PORT}/api/nodes/{$RABBITMQ.CLUSTER.NAME}@{HOST.NAME}?memory=true"]'tags:-tag: componentvalue: systemtriggers:-uuid: 729c448ebabb417bb7ce17b1634c4484expression: 'last(/RabbitMQ node by Zabbix agent/rabbitmq.node.uptime)<10m'name: 'RabbitMQ: has been restarted (uptime < 10m)'priority: INFOdescription: 'Uptime is less than 10 minutes'manual_close: 'YES'tags:-tag: scopevalue: notice-uuid: 61730555a0ae4f798ea740effb82764cname: 'RabbitMQ: Get nodes'key: 'web.page.get["{$RABBITMQ.API.SCHEME}://{$RABBITMQ.API.USER}:{$RABBITMQ.API.PASSWORD}@{$RABBITMQ.API.HOST}:{$RABBITMQ.API.PORT}/api/nodes/{$RABBITMQ.CLUSTER.NAME}@{HOST.NAME}?memory=true"]'history: 1htrends: '0'value_type: TEXTdescription: 'The HTTP API endpoint that returns nodes metrics'preprocessing:-type: REGEXparameters:- '\n\s?\n(.*)'- \1tags:-tag: componentvalue: rawtriggers:-uuid: 4f2a88d09b1b49879d80e0794ec19e0eexpression: 'nodata(/RabbitMQ node by Zabbix agent/web.page.get["{$RABBITMQ.API.SCHEME}://{$RABBITMQ.API.USER}:{$RABBITMQ.API.PASSWORD}@{$RABBITMQ.API.HOST}:{$RABBITMQ.API.PORT}/api/nodes/{$RABBITMQ.CLUSTER.NAME}@{HOST.NAME}?memory=true"],30m)=1'name: 'RabbitMQ: Failed to fetch nodes data (or no data for 30m)'priority: WARNINGdescription: 'Zabbix has not received data for items for the last 30 minutes.'manual_close: 'YES'dependencies:-name: 'RabbitMQ: Process is not running'expression: 'last(/RabbitMQ node by Zabbix agent/proc.num["{$RABBITMQ.PROCESS_NAME}"])=0'-name: 'RabbitMQ: Service is down'expression: 'last(/RabbitMQ node by Zabbix agent/net.tcp.service["{$RABBITMQ.API.SCHEME}","{$RABBITMQ.API.HOST}","{$RABBITMQ.API.PORT}"])=0'tags:-tag: scopevalue: availability-uuid: 1af326f40cdb407a96b34025062b4743name: 'RabbitMQ: Get node overview'key: 'web.page.get["{$RABBITMQ.API.SCHEME}://{$RABBITMQ.API.USER}:{$RABBITMQ.API.PASSWORD}@{$RABBITMQ.API.HOST}:{$RABBITMQ.API.PORT}/api/overview"]'history: 1htrends: '0'value_type: TEXTdescription: 'The HTTP API endpoint that returns cluster-wide metrics'preprocessing:-type: REGEXparameters:- '\n\s?\n(.*)'- \1tags:-tag: componentvalue: raw-uuid: 7fb61ad564db42d5a373912491f5c9d3name: 'RabbitMQ: Get queues'key: 'web.page.get["{$RABBITMQ.API.SCHEME}://{$RABBITMQ.API.USER}:{$RABBITMQ.API.PASSWORD}@{$RABBITMQ.API.HOST}:{$RABBITMQ.API.PORT}/api/queues"]'history: 1htrends: '0'value_type: TEXTdescription: 'The HTTP API endpoint that returns queues metrics'preprocessing:-type: REGEXparameters:- '\n\s?\n(.*)'- \1tags:-tag: componentvalue: rawdiscovery_rules:-uuid: 04ef7d13809c45009553815f60ef5ba8name: 'Health Check 3.8.9- discovery'type: DEPENDENTkey: rabbitmq.healthcheck.v389.discoverydelay: '0'description: 'Specific metrics up to and including version 3.8.4'item_prototypes:-uuid: 8b959a9d03dc4ae8bed7292973f4fcc4name: 'RabbitMQ: Healthcheck{#SINGLETON}'key: 'web.page.get["{$RABBITMQ.API.SCHEME}://{$RABBITMQ.API.USER}:{$RABBITMQ.API.PASSWORD}@{$RABBITMQ.API.HOST}:{$RABBITMQ.API.PORT}/api/healthchecks/node{#SINGLETON}"]'history: 7hdescription: 'Runs basic healthchecks in the current node. Checks that the rabbit application is running, channels and queues can be listed successfully, and that no alarms are in effect.'valuemap:name: 'RabbitMQ healthcheck'preprocessing:-type: REGEXparameters:- '\n\s?\n(.*)'- \1-type: JSONPATHparameters:- $.status-type: BOOL_TO_DECIMALparameters:- ''error_handler: CUSTOM_VALUEerror_handler_params: '0'tags:-tag: componentvalue: health-tag: componentvalue: systemtrigger_prototypes:-uuid: bf6bcbda20ed46cbb779d9c1f446dfa8expression: 'last(/RabbitMQ node by Zabbix agent/web.page.get["{$RABBITMQ.API.SCHEME}://{$RABBITMQ.API.USER}:{$RABBITMQ.API.PASSWORD}@{$RABBITMQ.API.HOST}:{$RABBITMQ.API.PORT}/api/healthchecks/node{#SINGLETON}"])=0'name: 'RabbitMQ: Node healthcheck failed'opdata: 'Current state: {ITEM.LASTVALUE1}'priority: AVERAGEdescription: 'https://www.rabbitmq.com/monitoring.html#health-checks'tags:-tag: scopevalue: availabilitymaster_item:key: 'web.page.get["{$RABBITMQ.API.SCHEME}://{$RABBITMQ.API.USER}:{$RABBITMQ.API.PASSWORD}@{$RABBITMQ.API.HOST}:{$RABBITMQ.API.PORT}/api/overview"]'preprocessing:-type: JSONPATHparameters:- $.management_version-type: JAVASCRIPTparameters:- |var rabbit_version = parseInt(value.split('.')[0]) * 10000 +parseInt(value.split('.')[1]) * 100 +parseInt(value.split('.')[2])return JSON.stringify(rabbit_version < 30810 ? [{'{#SINGLETON}': ''}] : []);-uuid: 3c0021a3e57142eb806deb5b47b6700aname: 'Health Check 3.8.10+ discovery'type: DEPENDENTkey: rabbitmq.healthcheck.v3810.discoverydelay: '0'description: 'Version 3.8.10+ specific metrics'item_prototypes:-uuid: 0f1cd729d8f4447db25e0af19eae595dname: 'RabbitMQ: Healthcheck: expiration date on the certificates{#SINGLETON}'key: 'web.page.get["{$RABBITMQ.API.SCHEME}://{$RABBITMQ.API.USER}:{$RABBITMQ.API.PASSWORD}@{$RABBITMQ.API.HOST}:{$RABBITMQ.API.PORT}/api/health/checks/certificate-expiration/1/months{#SINGLETON}"]'history: 7dusername: '{$RABBITMQ.API.USER}'password: '{$RABBITMQ.API.PASSWORD}'description: 'Checks the expiration date on the certificates for every listener configured to use TLS. Responds a 200 OK if all certificates are valid (have not expired), otherwise responds with a 503 Service Unavailable.'valuemap:name: 'RabbitMQ healthcheck'preprocessing:-type: REGEXparameters:- HTTP\/1\.1\b\s(\d+)- \1-type: JAVASCRIPTparameters:- |switch(value){ case '200': return 1 case '503': return 0 default: 2}-type: DISCARD_UNCHANGED_HEARTBEATparameters:- 3hstatus_codes: '200,503,404'retrieve_mode: HEADERStags:-tag: componentvalue: certificate-tag: componentvalue: healthtrigger_prototypes:-uuid: d180912136c74e5cb246655ecab75f57expression: 'last(/RabbitMQ node by Zabbix agent/web.page.get["{$RABBITMQ.API.SCHEME}://{$RABBITMQ.API.USER}:{$RABBITMQ.API.PASSWORD}@{$RABBITMQ.API.HOST}:{$RABBITMQ.API.PORT}/api/health/checks/certificate-expiration/1/months{#SINGLETON}"])=0'name: 'RabbitMQ: There are valid TLS certificates expiring in the next month'opdata: 'Current state: {ITEM.LASTVALUE1}'priority: AVERAGEdescription: 'http://{HOST.CONN}:{$RABBITMQ.API.PORT}/api/index.html'tags:-tag: scopevalue: notice-uuid: 701449b128cb42cdb971fc608ba9f29bname: 'RabbitMQ: Healthcheck: local alarms in effect on the this node{#SINGLETON}'key: 'web.page.get["{$RABBITMQ.API.SCHEME}://{$RABBITMQ.API.USER}:{$RABBITMQ.API.PASSWORD}@{$RABBITMQ.API.HOST}:{$RABBITMQ.API.PORT}/api/health/checks/local-alarms{#SINGLETON}"]'history: 7dusername: '{$RABBITMQ.API.USER}'

http://www.ppmy.cn/embedded/125371.html

相关文章

双指针_复写零_C++

双指针_复写零_C 1. 题目解析2. 算法解析3. 代码实现 1. 题目解析 leetcode链接&#xff1a;https://leetcode.cn/problems/duplicate-zeros/ 给你一个长度固定的整数数组 arr &#xff0c;请你将该数组中出现的每个零都复写一遍&#xff0c;并将其余的元素向右平移。 注意&a…

边学边用docker-为什么要进到容器里面修改权限

在 Docker 容器中修改文件夹权限&#xff0c;通常需要进入容器内部来执行命令&#xff0c;这是因为 Docker 容器提供了一个隔离的环境&#xff0c;其内部的文件系统与宿主机是隔离的。 1. 隔离性&#xff1a;Docker 容器设计为轻量级的隔离环境&#xff0c;每个容器都有自己的…

C#系统学习路线

分享一个C#程序员的成长学习路线规划&#xff0c;希望能够帮助到想从事C#开发的你。 我一直在想&#xff0c;初学者刚开始学习编程时应该学些什么&#xff1f;学习到什么程度才能找到工作&#xff1f;才能在项目中发现和解决Bug&#xff1f; 我不知道每位初学者在学习编程时是…

【unity进阶知识8】unity场景Scene的使用, 如何封装一个场景管理器

文章目录 一、场景基本操作1、加载切换场景2、获取场景信息3、激活场景4、场景基本属性获取5、已加载场景个数6、获取场景中所有物体7、创建新场景8、卸载销毁场景 二、使用协程方法来异步加载场景1、AsyncOperation相关的代码应写在一个协同程序中。2、allowSceneActivation加…

[单master节点k8s部署]31.ceph分布式存储(二)

Ceph配置 Ceph集群通常是一个独立的存储集群&#xff0c;可以部署在 Kubernetes 集群之外。Ceph 提供分布式存储服务&#xff0c;能够通过 RADOS、CephFS、RBD&#xff08;块存储&#xff09;、和 RGW&#xff08;对象存储&#xff09;等方式与 Kubernetes 集成。即使 Ceph 部…

数据结构之红黑树实现(全)

一、红黑树 红黑树是一种自平衡的二叉搜索树&#xff0c;它通过约束节点的颜色和结构来保持平衡。红黑树是由 Rudolf Bayer 在1972年发明的&#xff0c;被认为是一种优秀的平衡树结构&#xff0c;广泛应用于各种数据结构和算法中。 1.红黑树的性质 1. 每个结点是红的或者黑的…

使用idea和vecode创建vue项目并启动(超详细)

一、idea创建vue项目 创建项目之前先下载好插件 新建项目找到vue生成器 写好名称&#xff0c;找到自己需要存放的地址&#xff0c;node解释器安装方式可以看我上一个博客&#xff0c;vueCLI是选择vue的版本&#xff0c;我们可以使用idea自带的vue版本默认是vue3&#xff0c;创…

基于 Spring Boot + Quartz 实现定时任务持久化配置

前言 关于使用 Spring 实现定时任务的配置&#xff0c;可以参考官方文档&#xff1a; https://docs.spring.io/spring-framework/reference/integration/scheduling.html#scheduling-enable-annotation-support https://docs.spring.io/spring-boot/reference/io/quartz.htm…