The ouput, the connection looking ok:
[root@BRMON001 ~]# curl -vvv -k
https://10.202.1.69/nrdp/
* About to connect() to 10.202.1.69 port 443 (#0)
* Trying 10.202.1.69...
* Connected to 10.202.1.69 (10.202.1.69) 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: CN=161.89.129.130,OU=Development,O=Nagios Enterprises,L=St. Paul,ST=Minnesota,C=US
* start date: Dec 28 19:43:25 2018 GMT
* expire date: Dec 25 19:43:25 2028 GMT
* common name: 161.89.129.130
* issuer: CN=161.89.129.130,OU=Development,O=Nagios Enterprises,L=St. Paul,ST=Minnesota,C=US
> GET /nrdp/ HTTP/1.1
> User-Agent: curl/7.29.0
> Host: 10.202.1.69
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Wed, 01 Apr 2020 15:08:12 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
<
<!doctype html>
<html>
<head>
<title>Nagios Remote Data Processor</title>
<script src="includes/jquery-3.2.1.min.js"></script>
<link href="includes/bootstrap.min.css" rel="stylesheet" />
<script 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>
// 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(),
XMLDATA: $("#xmldata").val()
},
success: function(xml) { success_xml(xml); }
});
});
$(".submit-checkresult-json").click(function() {
$.ajax({
type: "POST",
dataType: "json",
data: {
cmd: "submitcheck",
token: $("#token").val(),
JSONDATA: $("#jsondata").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 />
<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/nag ... .html">can be found here.</a>
</small>
</div>
<button type="button" class="btn btn-primary submit-command">Submit Command</button>
</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="XMLDATA" id="xmldata" 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>
<button type="button" class="btn btn-primary submit-checkresult-xml">Submit XML Check Result</button>
</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="JSONDATA" id="jsondata" class="form-control form-control-sm">{
"checkresults": [
{
"checkresult": {
"type": "host",
"checktype": "1"
},
"hostname": "somehost",
"state": "0",
"output": "Everything looks okay! | perfdata=1;"
},
{
"checkresult": {
"type": "service",
"checktype": "1"
},
"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>
<button type="button" class="btn btn-primary submit-checkresult-json">Submit JSON Check Result</button>
</div><!-- /jsontab -->
</div><!-- /xml&json check result tabs -->
</div><!-- /checkresult tab -->
</div><!-- /action-contents -->
</div><!-- /col-12 -->
</div><!-- /row -->
<hr />
<!-- this is where the alerts show up -->
<div class="row">
<div class="col-12 messages">
</div>
</div>
</div><!-- /container -->
</body>
</html>
* Connection #0 to host 10.202.1.69 left intact