Update powerdns-recursor.inc.php

Debug print the correct url for direct connection
This commit is contained in:
Tony Murray
2016-08-02 20:42:04 -05:00
committed by GitHub
parent e8af37ef03
commit 3950f9dd4c

View File

@@ -42,7 +42,7 @@ if ($agent_data['app'][$name]) {
$scheme = (isset($config['apps'][$name]['https']) && $config['apps'][$name]['https']) ? 'https://' : 'http://';
d_echo("\nNo Agent Data. Attempting to connect directly to the powerdns-recursor server " . $device['hostname'] . ":8082\n");
d_echo("\nNo Agent Data. Attempting to connect directly to the powerdns-recursor server $scheme" . $device['hostname'] . ":$port\n");
$context = stream_context_create(array('http' => array('header' => 'X-API-Key: ' . $config['apps'][$name]['api-key'])));
$data = file_get_contents($scheme . $device['hostname'] . ':' . $port . '/servers/localhost/statistics', false, $context);
}