bird-house / birdhouse-deploy

Scripts and configurations to deploy the various birds and servers required for a full-fledged production platform
https://birdhouse-deploy.readthedocs.io/en/latest/
Apache License 2.0
4 stars 6 forks source link

:bug: [BUG]: Broken CanarieAPI monitoring configurations #429

Open fmigneault opened 6 months ago

fmigneault commented 6 months ago

Summary

The CanarieAPI template configurations seem to be invalid according to what CanarieAPI looks for in logs.

Details

Configurations define for example

    "monitoring": {
        "Weaver": {
            'request': {
                'url': 'http://weaver:4001/'
            },
            'response': {
                'text': '\{.*"message":.*"Weaver Information".*\}'
            }
        }
    }

The 'http://weaver:4001/' URL seems to assume a docker-compose link connection between canarie-api (ie proxy) and the relevant services. However, looking at stats of relevant services (eg: https://hirondelle.crim.ca/canarie/Weaver/service/stats), invocations are all marked as 0 and Never accessed.

The cause might be related to how monitoring is inspected in logs. If CanarieAPI looks for the PUBLIC FQDN endpoint, (eg: https://hirondelle.crim.ca/weaver/ or https://hirondelle.crim.ca/twitcher/ows/proxy/weaver/, then there would never be a match with 'http://weaver:4001/'.

NOTE Not 100% sure above is the cause. Needs further investigation. Using optional-components/canarie-api-full-monitoring (which is active on Hirondelle), the full PUBLIC FQDN should be monitored as well...

To Reproduce

Steps to reproduce the behavior:

  1. Spin up an instance with any service registered under CanarieAPI.
  2. Call the service to generate logs what would be expected to be collected by the monitoring.
  3. Look up the specific stats location of CanarieAPI for the targeted service.

Environment

Information Value
Server/Platform URL any
Version Tag/Commit latest
Related issues/PR
Related components CanarieAPI
Custom configuration

Concerned Organizations

mishaschwartz commented 6 months ago

May be related: In #428 @fmigneault noticed a few places where the TWITCHER_PROTECTED_PATH was not included in URLs used by canarie-api:

https://github.com/bird-house/birdhouse-deploy/blob/06e999752ee1b67a901299213e3a53b163b76c91/birdhouse/deprecated-components/flyingpigeon/config/canarie-api/canarie_api_monitoring.py.template#L27

https://github.com/bird-house/birdhouse-deploy/blob/06e999752ee1b67a901299213e3a53b163b76c91/birdhouse/deprecated-components/malleefowl/config/canarie-api/canarie_api_monitoring.py.template#L22