add notes about SSL console

This commit is contained in:
zzz
2025-04-09 11:38:28 -04:00
parent a867b50246
commit a4c8a0d183
2 changed files with 29 additions and 1 deletions

View File

@ -19,8 +19,11 @@ Edit /etc/prometheus/prometheus.yml and add:
basic_auth: # only if console is password protected, see below
username: xxxxxxx # only if console is password protected, see below
password: 00000000000000000000000000000000 # only if console is password protected, see below
scheme: https # only if console is SSL, see below
tls_config: # only if console is SSL, see below
insecure_skip_verify: true # only if console is SSL, see below
static_configs:
- targets: ['localhost:7657']
- targets: ['localhost:7657'] # or 7667 or other SSL port
And then tell prometheus to reload the config:
@ -59,3 +62,24 @@ or generate the MD5 hash as follows:
When you install the plugin for the first time, your browser will ask for
the MD5 password to access the plugin. Enter the 32-digit hash.
For remote router instances, SSL console is recommended so that
the Basic authentication is protected.
SSL console
-----------
To enable SSL console, edit the console command line on /configclients
to add -s port, for example:
net.i2p.router.web.RouterConsoleRunner 7657 0.0.0.0 -s 7667 127.0.0.1 ./webapps/
This requires routerconsole.advanced=true in router.config.
Alternatively, edit the file
~/.i2p/clients.config.d/00-net.i2p.router.web.RouterConsoleRunner-clients.config
Restart required in either case.
Then add the prometheus config as above.

View File

@ -193,6 +193,7 @@ public class PrometheusServlet extends BasicServlet {
out.write("<tr id=\"message\"><td colspan=\"5\" align=\"center\"><b>" + msg + "</b></td></tr>\n");
out.write("</table>\n");
if (c != null) {
out.write("<p><a href=\"/prometheus/metrics\">View raw metrics</a></p>\n");
out.write("<tr id=\"configsection\"><td>\n<hr>\n<div id=\"configtitle\"><b>Configuration</b>&nbsp;\n" +
"<a class=\"script\" id=\"expand\" href=\"#\" onclick=\"clean();expand();\">" +
"<img alt=\"Expand\" src=\"/prometheus/resources/images/expand.png\" title=\"Expand\"></a>\n" +
@ -222,6 +223,9 @@ public class PrometheusServlet extends BasicServlet {
" static_configs:\n" +
" - targets: ['localhost:").append(port).append("']\n" +
"</pre>\n");
buf.append("<p>For password-protected or SSL consoles, see the file <tt>")
.append(_context.getConfigDir())
.append("/plugins/prometheus/README.txt</tt> for instructions.</p>\n");
buf.append("</div>\n");
return buf.toString();
}