TECHZEN Zenoss User Community ARCHIVE  

Change Zenoss metric_consumer port (8443)

Subject: Change Zenoss metric_consumer port (8443)
Author: Jad Baz
Posted: 2018-11-23 12:35

Hello,

As part of the requirements for my Zenoss installation, I need to install all of Zenoss along with another application on the same host.
That application uses port 8443 and as such will conflict with Zenoss.
Is it possible to use a different port for Zenoss metric_consumer?

I've found 2 files that I need to change:
1. /etc/default/serviced: SERVICED_STATS_PORT
2. template file, zenoss-core-6.2.1_1.json
In this template, I identified 5 places where this needs to be changed by searching for "8443" in the template.
===============================================================================
"Name": "metric_consumer",
"Purpose": "import",
"Protocol": "tcp",
"PortNumber": 8443



===============================================================================
"Filename": "/opt/zenoss/etc/metric-consumer-app/configuration.yaml",
"Owner": "zenoss:zenoss",
"Permissions": "0644",
"Content": "authEnabled: true\n\nlogging:\n    level: INFO\n\nhttp:\n  port: 8443\n  adminPort: 58443\n  connectorType: nonblocking\n  ssl:\n      keyStore: etc/metric-consumer-app/cert/ssl.pfx\n      keyStorePassword: zapp_pass\n      keyStoreType:     pkcs12\n  requestLog:\n    console:\n      enabled: false\n\nwebSocketConfiguration:\n    maxTextMessageSize: 10485760\n\nmetricService:\n    jobSize: 1000\n    highCollisionMark: 2000000\n    maxClientWaitTime: 60000\n    minTimeBetweenBroadcast: 200\n    tsdbWriterThreads: 1\n    maxIdleTime: 10000\n    maxConnectionBackOff: 5000\n    minConnectionBackOff: 100\n    openTsdbClientPool:\n      maxKeepAliveTime: 300000\n      minTestTime:       60000\n      clientBufferSize:  65536\n      clients:\n        - {host: localhost, port: 4242}\n\n      clientFactory:\n        keepAlive:          true\n        connectTimeout:     1000\n        soTimeout:          1000\n\nmanagedReporter:\n    metricReporters:\n      - {posterType: http, username: \"$env[CONTROLPLANE_CONSUMER_USERNAME]\", password: \"$env[CONTROLPLANE_CONSUMER_PASSWORD]\", urlEnvironment: \"CONTROLPLANE_CONSUMER_URL\"}\n      - {posterType: bean, beanName: metric-service-poster}\n\nzenossCredentials:\n       username: \"{{(getContext . \"global.conf.zauth-username\")}}\"\n       password: \"{{(getContext . \"global.conf.zauth-password\")}}\"\n"


===============================================================================
"Name": "metric_consumer",
"Purpose": "export",
"Protocol": "tcp",
"PortNumber": 8443


===============================================================================
"HealthChecks": {
"listening": {
"Script": "nmap -oG - -Pn -sS -p 8443 127.0.0.1 | grep -q 8443/open


===============================================================================
"LogFilters": {
[...]
"nginx_error": "# nginx error logs\n\ngrok {\n    # Matches messages like the messages below:\n    # 2017/08/30 20:17:37 [error] 85#0: *41 upstream prematurely closed connection while reading response header from upstream, client: 172.17.42.1, server: , request: \"HEAD /ping/status/performance HTTP/1.1\", upstream: \"http://127.0.0.1:8888/ping/status\", host: \"localhost:8080\"\n    # 2017/08/31 14:58:09 [notice] 4802#0: signal process started\n    # request: \"GET /ws/metrics/store HTTP/1.1\"\n    # upstream: \"http://127.0.0.1:8443/ws/metrics/store\"\n\n    match =\u003e { \"message\" =\u003e [\n        \"^(?\u003cdatetime\u003e%{YEAR}[./-]%{MONTHNUM}[./-]%{MONTHDAY}[- ]%{TIME}) \\[%{LOGLEVEL:loglevel}\\] %{POSINT:pid}#%{NUMBER:tid}: %{DATA:message}\",\n        \"request: \\\"%{WORD:method} %{URIPATH:request} %{WORD}\\/%{NUMBER}\\\"\",\n        \"upstream: \\\"%{URI:upstream}\\\"\"\n    ]}\n    break_on_match =\u003e false\n}\n\n# Elasticsearch doesn't like the format of datetime.\n# This filter parses the datetime field into a time value,\n# removes the datetime field from the data, and\n# then uses the parsed value as the \"@timestamp\" for the message.\ndate {\n    match =\u003e [ \"datetime\", \"YYYY/MM/dd HH:mm:ss\" ]\n    remove_field =\u003e [\"datetime\"]\n}\n\nmutate {\n    gsub =\u003e [ \"loglevel\", \"debug\", \"DEBUG\" ]\n    gsub =\u003e [ \"loglevel\", \"info\", \"INFO\" ]\n    gsub =\u003e [ \"loglevel\", \"notice\", \"INFO\" ]\n    gsub =\u003e [ \"loglevel\", \"warn\", \"WARN\" ]\n    gsub =\u003e [ \"loglevel\", \"alert\", \"WARN\" ]\n    gsub =\u003e [ \"loglevel\", \"error\", \"ERROR\" ]\n    gsub =\u003e [ \"loglevel\", \"crit\", \"ERROR\" ]\n    gsub =\u003e [ \"loglevel\", \"emerg\", \"FATAL\" ]\n}\n8443​

So my question is: is there anything else to change or should this be enough?

------------------------------
Jad
------------------------------

< Previous
Zenoss 6 port requirements
  Next
Upgrade From Zenoss Core 4.2.4
>