ManageApp
Management Application Configuration
The N2SVCD Management Application provides a simple HTTP server to which operators can connect in order to view the current N2SVCD running configuration. Drilldown links allow operators to monitor in-use resources (e.g. to check connection status, and to review long-running calls in progress).
When the N2SVCD is running, you can connect your web browser to the N2SVCD
Management interface at the address http://<n2svcd-host>:8088/
, or other port
number as may be configured.
In addition:
- The same port number provides a HTTP/JSON API.
- The
svcmanage
command-line tool also provides run-time Management functions.
Note that the ManageApp
is quite distinct from the WatchdogApp
:
- The
WatchdogApp
is mandatory, whileManageApp
is entirely optional. - The
WatchdogApp
is never forked, butManageApp
may be forked. - The
WatchdogApp
is responsible for Shutdown on Signals, and Heartbeats. - The
ManageApp
supports query, trace, and management of applications and instances.
You should only ever require one Management Application instance within the N2SVCD, although it is possible to run multiple apps (as long as each one listens on a distinct TCP port number). You don’t need to run any Management Application at all, although not doing so means that you will not have the ability to query the status of your running services.
The following configuration is used to create a Management Application instance.
<?xml version="1.0" encoding="utf-8"?>
<n2svcd>
...
<applications>
...
<application name="Manager" module="ManageApp">
<include><lib>../apps/manage/lib</lib></include>
<parameters>
<parameter name="http_host" value="10.42.2.154"/>
<parameter name="http_port" value="8088"/>
<parameter name="security" value="sha1"/>
<parameter name="admin_password" value="LSNb2Q/UBFfpT.hd:gdiyvTHqk+lnJqogbloOBzTGIC8"/>
<parameter name="user_password" value="SuLk1c4I3tAEV4lj:TTHJaIHmkGxQKf+4Z3bZE2d48Cg"/>
</parameters>
</application>
...
</application>
...
</n2svcd>
Configuration Details
The application
element attributes for a Manage Application instance may include the below.
For details of the various parameter types used, refer to Common Configuration.
Parameter Name | Type | XML Type | Description |
---|---|---|---|
See: Common Application configuration | |||
module
|
String | Attribute |
[Required] ManageApp
|
include.lib
|
String | Element |
[Required] ../apps/manage/lib
|
parameters
|
Array | Attribute |
[Required] As per Common Configuration Application parameters .
|
"edr_enabled"
|
- | - | This value is ignored; the Manage Application does not support writing EDRs. |
"ssl"
|
Boolean | Attribute |
Whether or not the management GUI will operate under a secure SSL mode. If enabled, all traffic is expected via SSL and insecure connections will be rejected. (Default = 0 )
|
"http_host"
|
String | Attribute |
IPv4 Host Name or A.B.C.D IPv4 Address on which to listen for management requests when ssl is not enabled.(Default = 0.0.0.0 )
|
"http_port"
|
Integer | Attribute |
IPv4 Port Number on which to listen for management requests when ssl is not enabled.(Default = 8088 )
|
"https_host"
|
String | Attribute |
IPv4 Host Name or A.B.C.D IPv4 Address on which to listen for management requests when ssl is enabled.(Default = 0.0.0.0 )
|
"https_port"
|
Integer | Attribute |
IPv4 Port Number on which to listen for management requests when ssl is enabled.(Default = 8089 )
|
"server_ssl.ssl_cert"
|
String | Attribute | [Conditional] The file path on disk to the location of the SSL Certificate to use when generating SSL connections. This is required if SSL is enabled. The specified path must be readable by the application user. |
"server_ssl.ssl_key"
|
Integer | Attribute | [Conditional] The file path on disk to the location of the SSL Key to use when generating SSL connections. This is required if SSL is enabled. The specified path must be readable by the application user. |
"html_dir"
|
String | Attribute |
Directory containing static resource files for HTML management interface. (Default = ../apps/manage/html )
|
"use_cache"
|
Boolean | Attribute |
Whether static files cached forever in memory and never checked for changes. (Default = YES )
|
"security"
|
String | Attribute |
Specifies how passwords are encoded. Possible values are:
plain )
|
"admin_password"
|
String | Attribute |
The password for the admin user. For security = open and
security = closed this password is not used.
For security = plain this is a plaintext password.
For other types of security this is the hashed version of the password including a salt prefix.(Default = No admin Password)
|
"user_password"
|
String | Attribute |
The password for the user user. For security = open and
security = closed this password is not used.
For security = plain this is a plaintext password.
For other types of security this is the hashed version of the password including a salt prefix.(Default = No user Password)
|
Generating Hashed Passwords
When using the sha1
and bcrypt
methods to store passwords, the value to be written
into the database must be generated using the mkpasswd
program supplied with the n2svcd
daemon. This program is normally installed as /usr/share/n2svcd/bin/mkpasswd
.
$ cd /usr/share/n2svcd/bin
$ ./mkpasswd sha1
Password:
Re-Enter:
[Encrypted] = SuLk1c4I3tAEV4lj:TTHJaIHmkGxQKf+4Z3bZE2d48Cg
Example Management Page
An example management page is:
Message Handling
In addition to the common Application management messages, the ManageApp uses the following messages:
- MANAGEMENT Messages (!MANAGEMENT-*-REQUEST outbound).