This feature is available version 0.12 or higher.
This destination adds DNS A-records for yourCMDB objects to a given DNS zone in cPanel using the cPanel JSON API version 2. Any existing A records in that zone, that does not exists as objects in yourCMDB will be deleted. You can manage other record types like CNAME or MX records manually in that zone and the yourCMDB exporter will not touch these records.
To use this exporter, you need a valid cPanel account with username and password and a DNS zone, you can manage.
The exporter will not create a DNS zone for you. So the DNS zone should already exist, if you want to use this exporter.
short information | |
---|---|
class name | ExternalSystemCpanelDns |
needed destination parameter | cpanelApiUrl |
cpanelApiUser | |
cpanelApiPassword | |
domainName | |
needed variables | hostname |
ip |
name | required | description | example |
---|---|---|---|
cpanelApiUrl | required | cPanel API base URL | https://1.2.3.4:2083/json-api |
cpanelApiUser | required | cPanel username | admin |
cpanelApiPassword | required | cPanel password | admin |
domainName | required | DNS Zone managed by cPanel for adding DNS A records | objects.yourcmdb.org |
cpanelApiSslVerify | optional | disable SSL peer verification | false |
name | required | description | example |
---|---|---|---|
hostname | required | host part of the DNS A record | test |
ip | required | ip address of the DNS A record | 8.8.8.8 |
example of export task configuration:
<task name="cpanel-example"> <sources> <source objecttype="router" status="A" /> <source objecttype="switch" status="A" /> </sources> <destination class="ExternalSystemCpanelDns"> <parameter key="cpanelApiUrl" value="https://1.2.3.4:2083/json-api" /> <parameter key="cpanelApiUser" value="admin" /> <parameter key="cpanelApiPassword" value="admin" /> <parameter key="domainName" value="objects.yourcmdb.org" /> </destination> <variables> <variable name="hostname"> <value objecttype="router" fieldname="hostname" /> <value objecttype="switch" fieldname="hostname" /> </variable> <variable name="ip"> <value objecttype="router" fieldname="management-ip" /> <value objecttype="switch" fieldname="management-ip" /> </variable> </variables> </task>