NCPA-1.7.2: Linux/Windows: Checking running service
Posted: Wed Sep 17, 2014 9:16 am
Hello All,
Can you please explain me how I can check specific service on host using NCPA.
This is the line in how it executed when I use NCPA client:
[Wed Sep 17 10:11:38] root@sq5vrlngs001:~# /usr/local/nagios/libexec/./check_ncpa.py -H sq5vpmacc001.tor.quest.com -P 5693 -t ccc-M 'service?service=AirWatchCloudConnector&status=running' -v
If I using same line using Firefox I have following output:
https://sq5vpmacc001.xxx.com:5693/api/s ... cc&check=1
But if I change place of "check" option it gives me correct output in Firefox:
https://sq5vpmacc001.tor.quest.com:5693 ... 5vplngs001
But if I execute the same request and I was not logged-in using Login page, the NCPA will forward me to the login page.
Please see attached video (in rar attached file).
Looks like it is bug, but maybe I do something incorrect.
Thanks
Can you please explain me how I can check specific service on host using NCPA.
This is the line in how it executed when I use NCPA client:
[Wed Sep 17 10:11:38] root@sq5vrlngs001:~# /usr/local/nagios/libexec/./check_ncpa.py -H sq5vpmacc001.tor.quest.com -P 5693 -t ccc-M 'service?service=AirWatchCloudConnector&status=running' -v
Code: Select all
Connecting to: https://sq5vpmacc001.xxx.com:5693/api/service?service=AirWatchCloudConnector&status=running/?token=ccc&check=1
File returned contained:
<!DOCTYPE html>
<html lang='en'>
<head>
<link rel='stylesheet' href='/static/css/bootstrap.min.css' />
<link rel='stylesheet' href='/static/css/bootstrap-responsive.min.css' />
<link rel='stylesheet' href='/static/css/ncpa.css' />
<title>NCPA Web Interface</title>
<link rel="shortcut icon" type="image/png" href="/static/img/ncpa-favicon.png" />
<link rel="icon" type="image/png" href="/static/img/ncpa-favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="NCPA Frontend">
<meta name="author" content="Nicholas Scott">
<script src='/static/js/jquery-1.8.3.min.js'></script>
<script src='/static/js/bootstrap.min.js'></script>
<script src='/static/js/d3.v3.min.js'></script>
</head>
<body>
<div class='navbar navbar-inverse navbar-top'>
<div class='navbar-inner'>
<div class='container-fluid'>
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class='brand' href='/'>NCPA</a>
<div class="nav-collapse collapse">
<ul class="nav">
</ul>
<ul class="nav pull-right">
<li><a href="/static/help/index.html">Help</a></li>
<li class="divider-vertical"></li>
<li><a href="/logout">Logout</a></li>
</ul>
</div>
</div>
</div>
</div>
<div class='container' id="main-content-container">
<div class='hero-unit'>
<form class='form-signin' action='/login' method='post'>
<h4 class='form-signin-heading'>Login</h2>
<hr />
<input type='password' class='input-block-level' name='token' placeholder='token' />
<button class='btn' type='submit'>Sign In</button>
</form>
</div>
</div>
</body>
</html>
An error occurred:No JSON object could be decodedhttps://sq5vpmacc001.xxx.com:5693/api/s ... cc&check=1
Code: Select all
{
"value": {
"returncode": 2,
"stdout": "CRITICAL: Service AirWatchCloudConnector is running"
}
}
https://sq5vpmacc001.tor.quest.com:5693 ... 5vplngs001
Code: Select all
{
"value": {
"returncode": 0,
"stdout": "OK: Service AirWatchCloudConnector is running"
}
}Please see attached video (in rar attached file).
Looks like it is bug, but maybe I do something incorrect.
Thanks