Page 1 of 1
NRDS install on client: curl exited with error 179
Posted: Thu Apr 16, 2020 10:43 am
by azangwi
Steps I did:
Code: Select all
[root@<hostname> clients]$ cd /temp
[root@<hostname> clients]$ wget -O <CONFIG_NAME>.tar.gz "https://<nagiosIP/url>/nrdp/?cmd=nrdsgetclient&token=<TOKEN>&configname=<>"
[root@<hostname> clients]$ gunzip -c <configname>.tar.gz | tar xf -
[root@<hostname> clients]$ ./installnrds <hostname> 5
nagios group already exists.
nagios user already exists.
Installing NRDS Client
Adding cron jobs for <hostname> at a 5 minute interval
no crontab for nagios
Crontabs installed OK
Updating config and plugins
curl exited with error 1792
Installation complete
____________________________________________________
I checked the installation
crontab was correct
only nrds dir showed up not nagios dir
none of the nagios directories (libexec) were created and none of the plugins were downloaded.
Please advise.
NRDS Linux Install: curl exited with error 1792
Posted: Thu Apr 16, 2020 10:58 am
by azangwi
curl exited with error 1792
Code: Select all
[root@<host> clients]# ./installnrds <host> 5
nagios group already exists.
nagios user already exists.
Installing NRDS Client
Adding cron jobs for <host> at a 5 minute interval
no crontab for nagios
Crontabs installed OK
Updating config and plugins
curl exited with error 1792
Installation complete
I then checked the installation
was correct
pressed tab a few times
only got /usr/local/nrdp
no /usr/local/nagios dir
no plugins were installed and no nagios/libexec dir
Please advise
Re: NRDS install on client: curl exited with error 179
Posted: Thu Apr 16, 2020 1:49 pm
by cdienger
What OS is this being installed on and does the version of curl on the machine accept the --insecure option? A quick scan of the forum returned this similar sounding issue:
https://support.nagios.com/forum/viewto ... 16&t=32152
If that doesn't help resolve the issue, please run the command below to get some more debug information:
Re: NRDS install on client: curl exited with error 179
Posted: Fri Apr 17, 2020 10:43 am
by azangwi
OS is Linux -CentOS 7
curl does accept --insecure option
Code: Select all
# curl --help | grep insecure
-k, --insecure Allow connections to SSL sites without certs (H)
i ran
got the following output:
Code: Select all
+ . ./init.sh
+++ uname -s
++ os=Linux
+++ uname -r
++ rel=3.10.0-957.el7.x86_64
+++ uname -r
++ ver=3.10.0-957.el7.x86_64
+++ uname -p
++ arch=x86_64
++ platform=
++ case $os in
++ user=nagios
++ uid=-1
++ group=nagios
++ gid=-1
++ case $os in
++ prefix=/usr/local/nagios
++ nrdpdir=/usr/local/nrdp
++ userhome=/home/nagios
++ libexecdir=/usr/local/nagios/libexec
++ sysconfdir=/etc/nagios
++ case $os in
++ cronallow=/etc/cron.allow
++ crondeny=/etc/cron.deny
++ cp_fr='cp -fr'
++ case $os in
++ binpath=/bin:/usr/bin:/usr/sbin
++ PATH=/bin:/usr/bin:/usr/sbin
++ export PATH
++ basename ./installnrds
+ PROGNAME=installnrds
+ '[' x '!=' x ']'
+ '[' x<host> = x ']'
+ '[' x5 = x ']'
+ cronhost=<host>
+ croninterval=5
+ installdir=/usr/local/nrdp/clients
+ which bash
+ grep '^/'
+ '[' 0 -eq 0 ']'
++ which bash
+ bash=/bin/bash
+ which perl
+ grep '^/'
+ '[' 0 -eq 0 ']'
++ which perl
+ perl=/bin/perl
+ . ./1-usersgroups
++ . ./init.sh
++++ uname -s
+++ os=Linux
++++ uname -r
+++ rel=3.10.0-957.el7.x86_64
++++ uname -r
+++ ver=3.10.0-957.el7.x86_64
++++ uname -p
+++ arch=x86_64
+++ platform=
+++ case $os in
+++ user=nagios
+++ uid=-1
+++ group=nagios
+++ gid=-1
+++ case $os in
+++ prefix=/usr/local/nagios
+++ nrdpdir=/usr/local/nrdp
+++ userhome=/home/nagios
+++ libexecdir=/usr/local/nagios/libexec
+++ sysconfdir=/etc/nagios
+++ case $os in
+++ cronallow=/etc/cron.allow
+++ crondeny=/etc/cron.deny
+++ cp_fr='cp -fr'
+++ case $os in
+++ binpath=/bin:/usr/bin:/usr/sbin
+++ PATH=/bin:/usr/bin:/usr/sbin
+++ export PATH
++ case $os in
++ getent group nagios
++ result=0
++ '[' 0 -eq 2 ']'
++ echo 'nagios group already exists.'
++ getent passwd nagios
++ result=0
++ '[' 0 -eq 2 ']'
++ '[' 0 -eq 0 ']'
++ echo 'nagios user already exists.'
+ echo 'Installing NRDS Client'
+ echo ''
++ grep '^SEND_NRDP' nrds/nrds.cfg
++ sed -e 's/^SEND_NRDP/SEND_DIR/'
++ sed -e 's/\/send_nrdp\.sh//'
+ eval SEND_DIR=/usr/local/nrdp/clients
++ SEND_DIR=/usr/local/nrdp/clients
+ mkdir -p /usr/local/nrdp/clients
+ cp send_nrdp.php send_nrdp.py send_nrdp.sh /usr/local/nrdp/clients
+ chmod 775 /usr/local/nrdp/clients/send_nrdp.php /usr/local/nrdp/clients/send_nrdp.py /usr/local/nrdp/clients/send_nrdp.sh
+ mkdir -p /usr/local/nrdp/clients/nrds
+ cp nrds/nrds.cfg nrds/nrds_common.pl /usr/local/nrdp/clients/nrds
+ cat nrds/nrds.pl
+ sed -e 's%#!/usr/bin/perl%#!/bin/perl%'
+ sed -e 's%my $PATH=.*%my $PATH="/bin:/usr/bin:/usr/sbin";%'
+ sed -e 's%require "nrds_common\.pl.*%require "/usr/local/nrdp/clients/nrds/nrds_common.pl";%'
+ sed -e 's%^my $configfile = .*%my $configfile = "/usr/local/nrdp/clients/nrds/nrds.cfg";%'
+ sed -e 's%^my $nrds_updater = .*%my $nrds_updater = "/usr/local/nrdp/clients/nrds/nrds_updater.pl";%'
+ cat nrds/nrds_updater.pl
+ sed -e 's%#!/usr/bin/perl%#!/bin/perl%'
+ sed -e 's%^my $configfile = .*%my $configfile = "/usr/local/nrdp/clients/nrds/nrds.cfg";%'
+ sed -e 's%my $PATH=.*%my $PATH="/bin:/usr/bin:/usr/sbin";%'
+ sed -e 's%require "nrds_common\.pl.*%require "/usr/local/nrdp/clients/nrds/nrds_common.pl";%'
+ chown -R nagios:nagios /usr/local/nrdp/clients
+ chmod -R ug+xw /usr/local/nrdp/clients
+ echo 'Adding cron jobs for <host> at a 5 minute interval'
+ echo ''
+ crontmp=/tmp/cron-<host>
+ touch /tmp/cron-<host>
++ get_interval Linux 5
++ os=Linux
++ interval=5
++ case $os in
++ outputinterval='*/5'
++ echo '*/5'
+ crontabinterval='*/5'
+ case $os in
+ crontab -u nagios -l
+ sed '/-H '\''<host>'\''/d'
++ which echo
+ /bin/echo '*/5 * * * * /usr/local/nrdp/clients/nrds/nrds.pl -H '\''<host>'\'' > /dev/null 2>&1'
++ which echo
+ /bin/echo ''
+ crontab -u nagios /tmp/cron-<host>
+ '[' -f /etc/cron.deny ']'
+ grep nagios /etc/cron.deny
+ '[' 1 -eq 0 ']'
+ '[' -f /etc/cron.allow ']'
+ echo 'Crontabs installed OK'
+ echo 'Updating config and plugins'
++ /usr/local/nrdp/clients/nrds/nrds_updater.pl -f -H '$cronhost'
+ update='curl exited with error 1792'
+ echo curl exited with error 1792
+ echo 'Installation complete'
+ exit
Re: NRDS install on client: curl exited with error 179
Posted: Fri Apr 17, 2020 12:13 pm
by ssax
Do you have this set for the URL in that NRDS config's settings in
Admin > NRDS Config Manager?
What does these output?
Code: Select all
curl -k -vvv 'https://X.X.X.X/nrdp/'
curl -k -L -vvv 'https://X.X.X.X/nrdp/'
Re: NRDS install on client: curl exited with error 179
Posted: Fri Apr 17, 2020 12:17 pm
by azangwi
I have the hostname, and it worked on other clients, and when i ping nagios hostname it successfully resolves to correct ip.
Re: NRDS install on client: curl exited with error 179
Posted: Fri Apr 17, 2020 12:36 pm
by azangwi
Code: Select all
[nagios@<client_hostname> ~]$ curl -k -vvv 'https://<host>/nrdp/' >curlk.txt
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* About to connect() to <host> port 443 (#0)
* Trying <nagiosIP>...
* Connected to <host> (<nagiosIP>) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* skipping SSL peer certificate verification
* SSL connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
* Server certificate:
* subject: OU=cse,CN=<host>,<>
* start date: Jun 27 18:16:22 2019 GMT
* expire date: Jun 24 18:16:22 2029 GMT
* common name: <host>
* issuer: <>
> GET /nrdp/ HTTP/1.1
> User-Agent: curl/7.29.0
> Host: <host>
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Fri, 17 Apr 2020 17:27:43 GMT
< Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.4.16
< X-Powered-By: PHP/5.4.16
< Transfer-Encoding: chunked
< Content-Type: text/html; charset=UTF-8
<
{ [data not shown]
100 10594 0 10594 0 0 70209 0 --:--:-- --:--:-- --:--:-- 70626
* Connection #0 to host <host> left intact
[nagios@<client_hostname> ~]$ cat curlk.txt
<!doctype html>
<html>
<head>
<title>Nagios Remote Data Processor</title>
<script type="text/javascript" src="includes/jquery-3.2.1.min.js"></script>
<link href="includes/bootstrap.min.css" rel="stylesheet" />
<script type="text/javascript" src="includes/bootstrap.bundle.min.js"></script>
<style>
body {
margin: 2em 0;
}
.btn {
margin-top: 2em;
cursor: pointer;
}
.tab-content {
margin: 1em 0;
}
.token-group {
margin-top: 1em;
}
</style>
<script type="text/javascript">
// number of seconds to keep the alerts
var alert_timeout = 3;
function build_alert(cssclass, msg) {
var $alert = $("<div class=\"alert alert-" + cssclass + " form-control-sm\">" + msg + "</div>");
$(".messages").html($alert);
return $alert;
}
function check_message_status(status, msg) {
var $alertbox;
if (status != 0) {
$alertbox = build_alert("danger", msg);
} else {
$alertbox = build_alert("info", msg);
}
setTimeout(function() { $alertbox.remove(); }, (alert_timeout * 1000));
}
function success_xml(xml) {
//console.log("success_xml(xml) data:");
//console.log(xml);
var status = $(xml).find("status").text();
var msg = $(xml).find("message").text();
check_message_status(status, msg);
}
function success_json(json) {
//console.log("success_json(json) data:");
//console.log(json);
var status = json.result.status;
var msg = json.result.message;
check_message_status(status, msg);
}
$(function() {
// get the page hash so we can set the appropriate tabs
var page_hash = $(location).attr("hash").substr(1);
if (page_hash == "") {
// use the php defined default if no hash is used
page_hash = "json";
}
if (page_hash == "command") {
// this is the default, so we don't need to do anything
}
else if (page_hash == "checkresult") {
$(".nav-tabs a[href='#checkresult'").tab("show");
}
else if (page_hash == "xml") {
$(".nav-tabs a[href='#checkresult'").tab("show");
// we don't need to explicitly show the xml tab either
// since it is the default
//$(".nav-tabs a[href='#xml'").tab("show");
}
else if (page_hash == "json") {
$(".nav-tabs a[href='#checkresult'").tab("show");
$(".nav-tabs a[href='#json'").tab("show");
}
$(".submit-command").click(function() {
$.ajax({
type: "GET",
data: {
cmd: "submitcmd",
token: $("#token").val(),
command: $("#extcommand").val()
},
success: function(xml) { success_xml(xml); }
});
});
$(".submit-checkresult-xml").click(function() {
$.ajax({
type: "POST",
dataType: "xml",
data: {
cmd: "submitcheck",
token: $("#token").val(),
xml: $("#xml-data").val()
},
success: function(xml) { success_xml(xml); }
});
});
$(".submit-checkresult-json").click(function() {
$.ajax({
type: "POST",
dataType: "json",
data: {
cmd: "submitcheck",
token: $("#token").val(),
json: $("#json-data").val()
},
success: function(json) { success_json(json); }
});
});
});
</script>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-12">
<h2>NRDP · Nagios Remote Data Processor</h2>
</div>
</div>
<hr />
<!-- this is where the alerts show up -->
<div class="row">
<div class="col-12 messages">
</div>
</div>
<hr />
<div class="row">
<div class="col-12">
<ul class="nav nav-tabs" id="action-tabs" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="command-tab" data-toggle="tab" href="#command" role="tab" aria-controls="command" aria-selected="true">Submit Nagios Command</a>
</li>
<li class="nav-item">
<a class="nav-link" id="checkresult-tab" data-toggle="tab" href="#checkresult" role="tab" aria-controls="checkresult" aria-selected="false">Submit Check Result</a>
</li>
</ul>
<!-- token is used everywhere -->
<div class="form-group token-group">
<label for="token">Token</label>
<input type="text" name="token" id="token" value="token" placeholder="token" class="form-control form-control-sm">
<small class="form-text">
Use the token you've configured in your <code>config.inc.php</code> file.
</small>
</div>
<!-- command / check result tabs -->
<div class="tab-content" id="action-contents">
<!-- command tab -->
<div class="tab-pane fade show active" id="command" role="tabpanel" aria-labelledby="command-tab">
<div class="form-group">
<label for="extcommand">Command</label>
<input type="text" name="command" id="extcommand" value="DISABLE_HOST_NOTIFICATIONS;somehost" class="form-control form-control-sm">
<small id="command-command-help" class="form-text">
Specify your command string here. Helpful information <a href="https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/4/en/extcommands.html">can be found here.</a>
</small>
</div>
<a href="#" class="btn btn-primary submit-command">Submit Command</a>
</div><!-- /command-tab -->
<!-- checkresult tab -->
<div class="tab-pane fade" id="checkresult" role="tabpanel" aria-labelledby="checkresult-tab">
<ul class="nav nav-tabs" id="crtype-tabs" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="xml-tab" data-toggle="tab" href="#xml" role="tab" aria-controls="xml" aria-selected="true">XML Check Result</a>
</li>
<li class="nav-item">
<a class="nav-link" id="json-tab" data-toggle="tab" href="#json" role="tab" aria-controls="json" aria-selected="false">JSON Check Result</a>
</li>
</ul>
<!-- xml / json check result tabs -->
<div class="tab-content" id="crtpe-contents">
<!-- xml tab -->
<div class="tab-pane fade show active" id="xml" role="tabpanel" aria-labelledby="xml-tab">
<form method="post">
<div class="form-group">
<textarea rows="19" name="xml" id="xml-data" class="form-control form-control-sm"><?xml version='1.0'?>
<checkresults>
<checkresult type='host'>
<hostname>somehost</hostname>
<state>0</state>
<output>Everything looks okay! | perfdata=1;</output>
</checkresult>
<checkresult type='service'>
<hostname>somehost</hostname>
<servicename>someservice</servicename>
<state>1</state>
<output>WARNING: Danger Will Robinson! | perfdata=1;</output>
</checkresult>
</checkresults></textarea>
<small class="form-text">
Check result data in XML format.
</small>
</div>
<a href="#" class="btn btn-primary submit-checkresult-xml">Submit XML Check Result</a>
</div><!-- /xmltab -->
<!-- json tab -->
<div class="tab-pane fade" id="json" role="tabpanel" aria-labelledby="json-tab">
<div class="form-group">
<textarea rows="23" name="json" id="json-data" class="form-control form-control-sm">{
"checkresults": [
{
"checkresult": {
"type": "host"
},
"hostname": "somehost",
"state": "0",
"output": "Everything looks okay! | perfdata=1;"
},
{
"checkresult": {
"type": "service"
},
"hostname": "somehost",
"servicename": "someservice",
"state": "1",
"output": "WARNING: Danger Will Robinson! | perfdata=1;"
}
]
}</textarea>
<small class="form-text">
Check result data in JSON format.
</small>
</div>
<a href="#" class="btn btn-primary submit-checkresult-json">Submit JSON Check Result</a>
</div><!-- /jsontab -->
</div><!-- /xml&json check result tabs -->
</div><!-- /checkresult tab -->
</div><!-- /action-contents -->
</div><!-- /col-12 -->
</div><!-- /row -->
</div><!-- /container -->
</body>
</html>
Code: Select all
[nagios@<client_hostname> ~]$ curl -k -L -vvv 'https://<host>/nrdp/'> curlKL.txt
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* About to connect() to <host> port 443 (#0)
* Trying <nagiosIP>...
* Connected to <host> (<nagiosIP>) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* skipping SSL peer certificate verification
* SSL connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
* Server certificate:
* subject: OU=cse,CN=<host>,<>
* start date: Jun 27 18:16:22 2019 GMT
* expire date: Jun 24 18:16:22 2029 GMT
* common name: <>
* issuer: <>
> GET /nrdp/ HTTP/1.1
> User-Agent: curl/7.29.0
> Host: <host>
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Fri, 17 Apr 2020 17:20:07 GMT
< Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.4.16
< X-Powered-By: PHP/5.4.16
< Transfer-Encoding: chunked
< Content-Type: text/html; charset=UTF-8
<
{ [data not shown]
100 10594 0 10594 0 0 61897 0 --:--:-- --:--:-- --:--:-- 61953
* Connection #0 to host <host> left intact
[nagios@<client_hostname> ~]$ cat curlKL.txt
<!doctype html>
<html>
<head>
<title>Nagios Remote Data Processor</title>
<script type="text/javascript" src="includes/jquery-3.2.1.min.js"></script>
<link href="includes/bootstrap.min.css" rel="stylesheet" />
<script type="text/javascript" src="includes/bootstrap.bundle.min.js"></script>
<style>
body {
margin: 2em 0;
}
.btn {
margin-top: 2em;
cursor: pointer;
}
.tab-content {
margin: 1em 0;
}
.token-group {
margin-top: 1em;
}
</style>
<script type="text/javascript">
// number of seconds to keep the alerts
var alert_timeout = 3;
function build_alert(cssclass, msg) {
var $alert = $("<div class=\"alert alert-" + cssclass + " form-control-sm\">" + msg + "</div>");
$(".messages").html($alert);
return $alert;
}
function check_message_status(status, msg) {
var $alertbox;
if (status != 0) {
$alertbox = build_alert("danger", msg);
} else {
$alertbox = build_alert("info", msg);
}
setTimeout(function() { $alertbox.remove(); }, (alert_timeout * 1000));
}
function success_xml(xml) {
//console.log("success_xml(xml) data:");
//console.log(xml);
var status = $(xml).find("status").text();
var msg = $(xml).find("message").text();
check_message_status(status, msg);
}
function success_json(json) {
//console.log("success_json(json) data:");
//console.log(json);
var status = json.result.status;
var msg = json.result.message;
check_message_status(status, msg);
}
$(function() {
// get the page hash so we can set the appropriate tabs
var page_hash = $(location).attr("hash").substr(1);
if (page_hash == "") {
// use the php defined default if no hash is used
page_hash = "json";
}
if (page_hash == "command") {
// this is the default, so we don't need to do anything
}
else if (page_hash == "checkresult") {
$(".nav-tabs a[href='#checkresult'").tab("show");
}
else if (page_hash == "xml") {
$(".nav-tabs a[href='#checkresult'").tab("show");
// we don't need to explicitly show the xml tab either
// since it is the default
//$(".nav-tabs a[href='#xml'").tab("show");
}
else if (page_hash == "json") {
$(".nav-tabs a[href='#checkresult'").tab("show");
$(".nav-tabs a[href='#json'").tab("show");
}
$(".submit-command").click(function() {
$.ajax({
type: "GET",
data: {
cmd: "submitcmd",
token: $("#token").val(),
command: $("#extcommand").val()
},
success: function(xml) { success_xml(xml); }
});
});
$(".submit-checkresult-xml").click(function() {
$.ajax({
type: "POST",
dataType: "xml",
data: {
cmd: "submitcheck",
token: $("#token").val(),
xml: $("#xml-data").val()
},
success: function(xml) { success_xml(xml); }
});
});
$(".submit-checkresult-json").click(function() {
$.ajax({
type: "POST",
dataType: "json",
data: {
cmd: "submitcheck",
token: $("#token").val(),
json: $("#json-data").val()
},
success: function(json) { success_json(json); }
});
});
});
</script>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-12">
<h2>NRDP · Nagios Remote Data Processor</h2>
</div>
</div>
<hr />
<!-- this is where the alerts show up -->
<div class="row">
<div class="col-12 messages">
</div>
</div>
<hr />
<div class="row">
<div class="col-12">
<ul class="nav nav-tabs" id="action-tabs" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="command-tab" data-toggle="tab" href="#command" role="tab" aria-controls="command" aria-selected="true">Submit Nagios Command</a>
</li>
<li class="nav-item">
<a class="nav-link" id="checkresult-tab" data-toggle="tab" href="#checkresult" role="tab" aria-controls="checkresult" aria-selected="false">Submit Check Result</a>
</li>
</ul>
<!-- token is used everywhere -->
<div class="form-group token-group">
<label for="token">Token</label>
<input type="text" name="token" id="token" value="token" placeholder="token" class="form-control form-control-sm">
<small class="form-text">
Use the token you've configured in your <code>config.inc.php</code> file.
</small>
</div>
<!-- command / check result tabs -->
<div class="tab-content" id="action-contents">
<!-- command tab -->
<div class="tab-pane fade show active" id="command" role="tabpanel" aria-labelledby="command-tab">
<div class="form-group">
<label for="extcommand">Command</label>
<input type="text" name="command" id="extcommand" value="DISABLE_HOST_NOTIFICATIONS;somehost" class="form-control form-control-sm">
<small id="command-command-help" class="form-text">
Specify your command string here. Helpful information <a href="https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/4/en/extcommands.html">can be found here.</a>
</small>
</div>
<a href="#" class="btn btn-primary submit-command">Submit Command</a>
</div><!-- /command-tab -->
<!-- checkresult tab -->
<div class="tab-pane fade" id="checkresult" role="tabpanel" aria-labelledby="checkresult-tab">
<ul class="nav nav-tabs" id="crtype-tabs" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="xml-tab" data-toggle="tab" href="#xml" role="tab" aria-controls="xml" aria-selected="true">XML Check Result</a>
</li>
<li class="nav-item">
<a class="nav-link" id="json-tab" data-toggle="tab" href="#json" role="tab" aria-controls="json" aria-selected="false">JSON Check Result</a>
</li>
</ul>
<!-- xml / json check result tabs -->
<div class="tab-content" id="crtpe-contents">
<!-- xml tab -->
<div class="tab-pane fade show active" id="xml" role="tabpanel" aria-labelledby="xml-tab">
<form method="post">
<div class="form-group">
<textarea rows="19" name="xml" id="xml-data" class="form-control form-control-sm"><?xml version='1.0'?>
<checkresults>
<checkresult type='host'>
<hostname>somehost</hostname>
<state>0</state>
<output>Everything looks okay! | perfdata=1;</output>
</checkresult>
<checkresult type='service'>
<hostname>somehost</hostname>
<servicename>someservice</servicename>
<state>1</state>
<output>WARNING: Danger Will Robinson! | perfdata=1;</output>
</checkresult>
</checkresults></textarea>
<small class="form-text">
Check result data in XML format.
</small>
</div>
<a href="#" class="btn btn-primary submit-checkresult-xml">Submit XML Check Result</a>
</div><!-- /xmltab -->
<!-- json tab -->
<div class="tab-pane fade" id="json" role="tabpanel" aria-labelledby="json-tab">
<div class="form-group">
<textarea rows="23" name="json" id="json-data" class="form-control form-control-sm">{
"checkresults": [
{
"checkresult": {
"type": "host"
},
"hostname": "somehost",
"state": "0",
"output": "Everything looks okay! | perfdata=1;"
},
{
"checkresult": {
"type": "service"
},
"hostname": "somehost",
"servicename": "someservice",
"state": "1",
"output": "WARNING: Danger Will Robinson! | perfdata=1;"
}
]
}</textarea>
<small class="form-text">
Check result data in JSON format.
</small>
</div>
<a href="#" class="btn btn-primary submit-checkresult-json">Submit JSON Check Result</a>
</div><!-- /jsontab -->
</div><!-- /xml&json check result tabs -->
</div><!-- /checkresult tab -->
</div><!-- /action-contents -->
</div><!-- /col-12 -->
</div><!-- /row -->
</div><!-- /container -->
</body>
</html>
Re: NRDS install on client: curl exited with error 179
Posted: Fri Apr 17, 2020 12:58 pm
by tgriep
When you run the installnrds script, are you putting in a valid hostname for the <hostname> argument?
Does it have any special characters in it?
Re: NRDS install on client: curl exited with error 179
Posted: Fri Apr 17, 2020 1:28 pm
by azangwi
Yes, i'm putting a valid hostname in it.
Only non alphanumeric character is '-'
Re: NRDS install on client: curl exited with error 179
Posted: Fri Apr 17, 2020 1:53 pm
by tgriep
The updater perl script is causing the error so lets trace it.
Install this package on the remote server by running this.
Or this
Then run this command to trace the output of the script. Replace Host-Name with the actual host name and run it from the clients folder from the NRDS installer.
Code: Select all
perl -d:Trace /usr/local/nrdp/clients/nrds/nrds_updater.pl -f -H Host-Name