Skip to content

Static DNS Instructions

Raghavendra Nataraj edited this page Aug 29, 2019 · 1 revision

Static DNS

Introduction

Static DNS feature is introduced in NetCHASM to provide ability to add IP addresses to manually to health checks rather than looking for DNS to resolve to IP addresses. This feature skips the DNS resolution step and use the user provided IP addresses for health checking.

How TO

1. Config changes

The configs follow the similar structure as specified in the check-conf-sample.yaml.

-   name: hostGroup1.hm.foo.coms
    check-type: http
    check-info: /status.html
    host:
        - host1.hm.foo.com
        - host2.hm.foo.com

Additionally we need to specify the dns-type as static for the hostgroup.

-   name: hostGroup1.hm.foo.coms
    check-type: http
    check-info: /status.html
    dns-type: static
    host:
        - host1.hm.foo.com
        - host2.hm.foo.com

This creates Host Group entry with no IP address to resolve.

2. Static DNS manipulations

Adding/Removing IP address to the host using the hm_staticdns utility

Adding IP address to Host hm_staticdns adddnsaddresses host1.hm.foo.com 127.0.1.2 127.0.1.3 . . .

Removing IP address from host hm_staticdns removednsaddresses host1.hm.foo.com 127.0.1.2 127.0.1.3 . . .

Get current IPs set for the host. hm_staticdns getdnsaddresses host1.hm.foo.com

Clone this wiki locally