Ad Widget

Collapse

Monitoring URL - Trigger for "Temporary failure in name resolution"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • anjo_ed
    Junior Member
    • Feb 2024
    • 5

    #1

    Monitoring URL - Trigger for "Temporary failure in name resolution"

    Hello, how are you doing ?

    So, I have a Dev environment with the follow configuration:
    - Zabbix 6.4
    - Ubuntu 22.04
    - 10 hosts: 2 ubuntu and 8 URLs


    My URLs were create using this parameters:


    Code:
    body:
    jsonrpc: "2.0"
    method: "item.create"
    params:
    name: "Check {{ item }}"
    key_: "web.page.get['{{ item }}']"
    hostid: "{{ zabbix_template_id }}"
    type: 19 # HTTP agent
    value_type: 3 # Numeric Unsigned
    interfaceid: 0 # Não necessário para HTTP agent
    tags:
    - tag: "URL"
    value: "{{ item }}"
    delay: "30s"
    url: "{{ item }}"
    status_codes: "200"
    follow_redirects: 1
    output_format: 1 # Extracted JSON
    posts: ""
    headers:
    Content-Type: "application/json"
    verify_host: 0
    verify_peer: 0
    allow_traps: 0
    auth: "{{ zabbix_api_token }}"
    id: 1
    Where ITEM is an URL; the type is HTTP Agent
    Here we have an example:


    Click image for larger version

Name:	image.png
Views:	306
Size:	67.2 KB
ID:	479265
    Click image for larger version

Name:	image.png
Views:	224
Size:	63.1 KB
ID:	479266


    So, it is working when the domain exists, I mean, when it is resolving and it is not returning an error like: "Temporary failure in name resolution". However, How Can I monitor this situation ? When is the domain not resolving ? How could I detect it and create an alert for it ? Is there a way ? Maybe I am using the wrong type to monitor it ?

    Thanks!
  • anjo_ed
    Junior Member
    • Feb 2024
    • 5

    #2
    Hello.

    I didn't find a solution yet. Maybe the solution is to use curl together with the system.run ?

    Comment

    Working...