diff --git a/HelmChart/Public/oneuptime/templates/_helpers.tpl b/HelmChart/Public/oneuptime/templates/_helpers.tpl index 87a28b50d1..67308d4d4f 100644 --- a/HelmChart/Public/oneuptime/templates/_helpers.tpl +++ b/HelmChart/Public/oneuptime/templates/_helpers.tpl @@ -91,8 +91,6 @@ Usage: value: {{ $.Values.port.incomingRequestIngest | squote }} - name: FLUENT_INGEST_PORT value: {{ $.Values.port.fluentIngest | squote }} -- name: PROBE_PORT - value: {{ $.Values.port.probe | squote }} - name: TEST_SERVER_PORT value: {{ $.Values.port.testServer | squote }} - name: ACCOUNTS_PORT diff --git a/HelmChart/Public/oneuptime/values.yaml b/HelmChart/Public/oneuptime/values.yaml index 517c779281..7caf33b075 100644 --- a/HelmChart/Public/oneuptime/values.yaml +++ b/HelmChart/Public/oneuptime/values.yaml @@ -223,7 +223,6 @@ port: # If you are connecting Status Pages to custom domains, then this will be the port where the status page will be hosted on. statusPageHttpsPort: 443 haraka: 2525 - probe: 3500 otelCollectorGrpc: 4317 otelCollectorHttp: 4318 isolatedVM: 4572 diff --git a/Probe/Dockerfile.tpl b/Probe/Dockerfile.tpl index 2912ecddf4..3aedfcd86b 100644 --- a/Probe/Dockerfile.tpl +++ b/Probe/Dockerfile.tpl @@ -73,10 +73,6 @@ RUN npx playwright install --with-deps COPY ./Probe/package*.json /usr/src/app/ RUN npm install -# Expose ports. -# - 3087: OneUptime-backend -EXPOSE 3087 - {{ if eq .Env.ENVIRONMENT "development" }} #Run the app CMD [ "npm", "run", "dev" ] diff --git a/Probe/Index.ts b/Probe/Index.ts index f47dd4ae8b..e5b4195cbf 100644 --- a/Probe/Index.ts +++ b/Probe/Index.ts @@ -9,6 +9,7 @@ import logger from "Common/Server/Utils/Logger"; import App from "Common/Server/Utils/StartServer"; import Telemetry from "Common/Server/Utils/Telemetry"; import "ejs"; +import Port from "Common/Types/Port"; const APP_NAME: string = "probe"; @@ -22,7 +23,7 @@ const init: PromiseVoidFunction = async (): Promise => { // init the app await App.init({ appName: APP_NAME, - port: undefined, + port: new Port(3874), // some random port to start the server. Since this is the probe, it doesn't need to be exposed. isFrontendApp: false, statusOptions: { liveCheck: async () => {}, diff --git a/Probe/Services/Register.ts b/Probe/Services/Register.ts index d384510ab0..5830f17376 100644 --- a/Probe/Services/Register.ts +++ b/Probe/Services/Register.ts @@ -134,6 +134,7 @@ export default class Register { if (result.isSuccess()) { logger.debug("Probe Registered"); + logger.debug(result.data); const probeId: string = result.data["_id"] as string; diff --git a/config.example.env b/config.example.env index d3dda6c638..dacbe6be8b 100644 --- a/config.example.env +++ b/config.example.env @@ -119,7 +119,6 @@ PROBE_INGEST_PORT=3400 OPEN_TELEMETRY_INGEST_PORT=3403 FLUENT_INGEST_PORT=3401 INCOMING_REQUEST_INGEST_PORT=3402 -PROBE_PORT=3500 TEST_SERVER_PORT=3800 ACCOUNTS_PORT=3003 STATUS_PAGE_PORT=3105 @@ -179,7 +178,7 @@ GLOBAL_PROBE_1_NAME="Probe-1" GLOBAL_PROBE_1_DESCRIPTION="Global probe to monitor oneuptime resources" GLOBAL_PROBE_1_MONITORING_WORKERS=5 GLOBAL_PROBE_1_MONITOR_FETCH_LIMIT=10 -GLOBAL_PROBE_1_ONEUPTIME_URL=http://probe-ingest:3400 +GLOBAL_PROBE_1_ONEUPTIME_URL=http://localhost GLOBAL_PROBE_1_SYNTHETIC_MONITOR_SCRIPT_TIMEOUT_IN_MS=60000 GLOBAL_PROBE_1_CUSTOM_CODE_MONITOR_SCRIPT_TIMEOUT_IN_MS=60000 @@ -188,7 +187,7 @@ GLOBAL_PROBE_2_NAME="Probe-2" GLOBAL_PROBE_2_DESCRIPTION="Global probe to monitor oneuptime resources" GLOBAL_PROBE_2_MONITORING_WORKERS=5 GLOBAL_PROBE_2_MONITOR_FETCH_LIMIT=10 -GLOBAL_PROBE_2_ONEUPTIME_URL=http://probe-ingest:3400 +GLOBAL_PROBE_2_ONEUPTIME_URL=http://localhost GLOBAL_PROBE_2_SYNTHETIC_MONITOR_SCRIPT_TIMEOUT_IN_MS=60000 GLOBAL_PROBE_2_CUSTOM_CODE_MONITOR_SCRIPT_TIMEOUT_IN_MS=60000 diff --git a/docker-compose.base.yml b/docker-compose.base.yml index 4abc7e6148..675c342284 100644 --- a/docker-compose.base.yml +++ b/docker-compose.base.yml @@ -50,7 +50,6 @@ x-common-variables: &common-variables OPEN_TELEMETRY_INGEST_PORT: ${OPEN_TELEMETRY_INGEST_PORT} INCOMING_REQUEST_INGEST_PORT: ${INCOMING_REQUEST_INGEST_PORT} FLUENT_INGEST_PORT: ${FLUENT_INGEST_PORT} - PROBE_PORT: ${PROBE_PORT} TEST_SERVER_PORT: ${TEST_SERVER_PORT} ACCOUNTS_PORT: ${ACCOUNTS_PORT} STATUS_PAGE_PORT: ${STATUS_PAGE_PORT} @@ -351,12 +350,10 @@ services: max-size: "1000m" probe-1: - networks: - - oneuptime restart: always + network_mode: host environment: <<: *common-server-variables - PORT: ${PROBE_PORT} PROBE_NAME: ${GLOBAL_PROBE_1_NAME} PROBE_DESCRIPTION: ${GLOBAL_PROBE_1_DESCRIPTION} PROBE_MONITORING_WORKERS: ${GLOBAL_PROBE_1_MONITORING_WORKERS} @@ -372,12 +369,10 @@ services: max-size: "1000m" probe-2: - networks: - - oneuptime restart: always + network_mode: host environment: <<: *common-server-variables - PORT: ${PROBE_PORT} PROBE_NAME: ${GLOBAL_PROBE_2_NAME} PROBE_DESCRIPTION: ${GLOBAL_PROBE_2_DESCRIPTION} PROBE_MONITORING_WORKERS: ${GLOBAL_PROBE_2_MONITORING_WORKERS}