Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 17 13:29
    justb4 updated the wiki
  • Jun 15 13:50
    justb4 commented #367
  • Jun 15 06:45
    p4tr1ckno11 closed #367
  • Jun 15 06:45
    p4tr1ckno11 commented #367
  • Jun 10 11:21
    p4tr1ckno11 labeled #367
  • Jun 10 11:21
    p4tr1ckno11 opened #367
  • Jun 08 09:02
  • May 26 14:45
    jochemthart1 labeled #366
  • May 26 14:45
    jochemthart1 opened #366
  • May 23 12:36
    aspashur starred geopython/GeoHealthCheck
  • May 08 16:56
    dependabot[bot] labeled #365
  • May 08 16:56
    dependabot[bot] opened #365
  • May 08 16:56

    dependabot[bot] on pip

    Bump eventlet from 0.24.1 to 0.… (compare)

  • May 01 11:49
    justb4 opened #364
  • May 01 11:49
    justb4 labeled #364
  • May 01 11:08
    justb4 milestoned #363
  • May 01 11:05
    justb4 labeled #363
  • May 01 11:05
    justb4 opened #363
  • May 01 10:34
    justb4 closed #356
Janne Heikkilä
@jampukka
Probably best to change that also so people can use the service with OWSLib
Just van den Broecke
@justb4
OWSLib looks for service-desc and type='application/vnd.oai.openapi+json;version=3.0' in landing page to get OpenAPI doc url, but does not use HTTP Content neg.
Janne Heikkilä
@jampukka
So it's the GHC OAFeat probe that does it?
Just van den Broecke
@justb4
Users of OWSLib now can add headers, but only in the constructor of oafeat client. My first try was with ?f=json, but got into path issues with OWSLib, maybe a bug, so switched to HTTP COntent neg.
Yes GHC OAFeat probe sets the HTTP Headers, fixed now to "Accept: application/json", but maybe this is a direction with many interworking issues (over f=json).
Or the headers should be derived from the endpoint's metadata.
Janne Heikkilä
@jampukka
I see it passes the headers to the constructor
Just van den Broecke
@justb4
Yes, so it is hard to change per-request.
Janne Heikkilä
@jampukka
But it's simple for Basic Auth for example
Does OWSLib Features client work with anything else than JSON?
Just van den Broecke
@justb4
Does not seem so: single _request() function: return response.json()
with the headers from the constructor.
Janne Heikkilä
@jampukka
yeah not trivial to change that
Just van den Broecke
@justb4
But I need to first solve some Docker build issues for GHC (demo). OWSLib issues: best discussed on https://gitter.im/geopython/OWSLib
Janne Heikkilä
@jampukka
Thanks I'll join there
Just van den Broecke
@justb4
Just van den Broecke
@justb4
So Content Negotiation it will be. Will adapt GHC OAFeat Probe to send proper Accept: headers via issue #313 .
Just van den Broecke
@justb4
Upcoming Content Negotiation OAFeat Probe: geopython/GeoHealthCheck#338 ..
Just van den Broecke
@justb4
Janne Heikkilä
@jampukka
great, thanks!
Just van den Broecke
@justb4
GeoHealthCheck 0.8.3 is out. See the release info for what went in. Highlights: making GHC outgoing HTTP more web-friendly with User-Agent and compression Accept. Upgraded OWSLib to 0.20.0 (now WFS auth should work) and enhanced OGC OAFeat Probe support. German translation patches contributed by @astroidex.
Astrid Emde
@astroidex
Congratulation to the release of GeoHealthCheck 0.8.3
MiroslavHrcan
@MiroslavHrcan
Hi all, I am completely new user of GeoHealthChcek and I have deployed GHC as Docker container with default settings, tried to add one WMS and except first request, it doesn’t send any, even I set to run every 10 minutes. I suppose that I had to do more than default setting, right? Thx for any response.
James Passmore
@nmtoken
Just a quick question on the, GeoHealthCheck.plugins.check.checks.HttpStatusNoError ...The check itself is a test if the HTTP status code is in the 400 or 500-range... does that mean that if the service has some authentication, the test would fail on the challenge response (401 unauthorized), or only if the authentication failed
Just van den Broecke
@justb4
@MiroslavHrcan yes you gave the answer already in your last sentence: you have to set the env var: GHC_RUNNER_IN_WEBAPP=True. The default for Docker is False. There has been some discussion and an issue around this: #303. We are a bit cautious to change this default as it may silently affect existing installs. Especially in a Docker deployment it is good practice to separate the 3 main GHC components (UI, Healthcheck Runner and database). docker-compose is a convenient way, see this example.
Just van den Broecke
@justb4
@nmtoken no definitive answer. This is a broad Check. You could write a Check Plugin for a specific 401-Check. Out of my head: the Run report would specify the specific HTTP-error code. I think both your options apply: AFAIK in HTTP (Basic, Token) Authentication is a one-time request/response: if there are no auth-headers or if the auth-headers contain the wrong credentials, a 401 response is returned. GHC supports two Auth methods: Basic and Bearer Token per Resource (endpoint) which can be configured in the UI and will be sent with each HTTP-request in the HTTP headers.
MichaelOstling
@MichaelOstling
Hi, Im trying to find ways how to add new services into GeoHealthCheck through a API. I have a CSW where I would like to monitor all referenced services. Is there a API to add new services? Or should I export the json config-file in database and add my services into that file?
Just van den Broecke
@justb4

@MichaelOstling thanks, that is actually a scenario (add CSW and then monitor referenced OWS services) proposed at a FOSS4G presentation (think by GeoCat). This would require a new (CSW) Probe Plugin. This is similar to the GeoNode monitoring: a GeoNode endpoint is added and then all its referenced OWS-es endpoints are automatically fetched and added to a GHC instance. There is already a CSW Resource Type.

Export/Import JSON is really only used for Unit-testing, it is quite radical: wiping all existing data in the DB.

There is no API yet, it is our next-planned big Feature. Lack of time and funding. There is a spec already:
https://github.com/geopython/GeoHealthCheck/wiki/API-Specification .

MichaelOstling
@MichaelOstling
Are there any estimates on the amount of funding needed for this Feature ?
I could maybe cover some of the costs.
KoalaGeo
@KoalaGeo
Would a OGC web services / OGCAPI zabbix plugin have wider appeal/use case?
KoalaGeo
@KoalaGeo
Just thinking out loud, not a comment on GeoHealthCheck! we've an instance running internally.
Just van den Broecke
@justb4
@MichaelOstling thanks there was at least one other party interested in an API, so joint funding may be arranged. Hold on, DM me to progress this.
Just van den Broecke
@justb4

@KoalaGeo yes, interesting question. Having some thoughts: there are many many FOSS monitoring frameworks, Prometheus/Grafana (I use mostly), Icinga, Datadog, etc. And Zabbix offcourse. True, a lot of what GHC is does is covered (scheduling, data collection, notification, visualization). The heart of GHC are the often extensive Probes/Checks for OGC and other APIs (like GeoNode). With a lot of complex work delegated to OWSLib. These would all have to be (re)written (for Zabbix Agent2) in GoLang. Plus the Probe/Check configuration-capabilities are extensive.

On the other hand integrations with existing monitoring systems has been projected for GHC at the level of data sampling for existing monitoring systems. The current GHC API already allows for summary data, so a simple core-Zabbix command-based shell extension could at least do a curl-type GHC API call and e.g. report number of failing Resources or even more. Even GHC Probes could be executed via commands, so that level of integration is also possible.

ALZ
@axza:matrix.org
[m]

Hello Humans - I'm stucked starting runner bcs. pytz doesnt know Europe/UTC... any hints where to start troubleshooting?

pytz.exceptions.UnknownTimeZoneError: 'Europe/UTC'

Just van den Broecke
@justb4
Looks related to APScheduler package. GHC does not require pytz directly. Working production version has APScheduler==3.6.1 with pytz==2020.4. Further hard to tell without environment specifics (Timezone settings, Python, Docker etc).
1 reply
epifanio
@epifanio
Hi, I am trying to start a GHC istance on a remote server - do you have any experience setting it up with traefik as reverse proxy ?
1 reply
epifanio
@epifanio
Working on the GeoHealCheck settings, I can't manage to change the admin password. I also tried to rebuild the image setting the admin password in the dockerfile - but it is still using the default. Is it something that gets stored in the DB and I need to remove it manually?
Just van den Broecke
@justb4
@epifanio I run all my GHC production instances with Traefik, so good choice!
No manual admin creds should be necessary. Should be able via Docker env vars: GHC_ADMIN_NAME and GHC_ADMIN_PWD etc via Docker or docker-compose env vars.
epifanio
@epifanio
@justb4 Thanks! I tried to set those values in the ghc.env file.
They are picked up fine the first time I run the service but If i shut the service down -> change the values in the env -> restart the service
the new values are ignored and the service still uses the old one
Just van den Broecke
@justb4
@epifanio yes, on first startup the DB is created and initialized. There is no intelligence (yet) to detect that any admin credentials were changed. Would be nice new feature. So for now, you should delete the DB and restart or manage the DB directly in a running GHC instance. Latter is described in documentation as you have to encrypt the password.
epifanio
@epifanio
Great! thanks for confirming it - I will try to log into the runner and explore the GeoHealthCheck python lib and have alook at the db structure after loading some records.
I added few records (CSW endpoints) via the web UI - but I was thinking to check if possible to update the db directly with a insert (so to add records in a batch)
  • I also have to work on a thredds catalog probe (checking opendap resource url for a given xml catalog) - hope to be able to make a contribution.
Just van den Broecke
@justb4
Folks, we're in the process of migrating Travis and DockerHub builds to GitHub actions. As a start I've made latter a GH workflow. But if there are among you with ample experience in GH Workflows, your help appreciated! See also the issue: geopython/GeoHealthCheck#356
Just van den Broecke
@justb4
Via #320 we now have a nice Docker workflow for both GH push-to-master and PRs: Docker Image is always built and GHC Unit tests run. Only for push-to-master is the Image also pushed to DockerHub (when tests pass, but check). Still we need to speed up the Docker build (via issue #355).
Just van den Broecke
@justb4
Folks: GHC is now over from Travis to GitHub Workflows via PR #360.
jochemthart1
@jochemthart1

Hi, I'm trying to run checks on 500 resources by adding them directly into the sqlite db through a script. However, some resources fail randomly (they might respond OK one time and error the next time). What I have noticed is that these failures happen more often when I set the run_frequency to a lower number and that these failures often happen at the same time. It is as if the failures are caused by the checks running too close to each other. Most failures happen when the checked_datetime is less than 0.1s after each other.

This might not give problems when adding resources through the interface, as these resources are added to the schedule at the moment they are added. However, when I add 500 resources to the database, they will be scheduled at whole minutes between now and now+run_frequency.
scheduler.py github line 247

This means that the chances are high that with 500 resources with a run_frequency of 60, there are on average ~10 checks each minute, which also start at approximately at the same time.

Something I found very interesting is that when I add a resource to those 500 through the interface, this resource never fails. The same is true for when I 'edit' a resource, it will not fail anymore as well. I still haven't been able to pinpoint what the difference is here.

For now I have GHC running with a change in scheduler.py where resources are scheduled with 5s in-between them instead of randomly determined. This works, but this means that it takes 45 minutes to complete for 500 resources and I would like to get it down to less than 10 minutes.

Do you happen to know why running resources so close to each other might give errors and if this is a common problem with checking many resources or if it is caused by the fact that they are added to the db through a script?

Just van den Broecke
@justb4
@jochemthart1 thanks for sharing. No definitive answer. The fact that Resources are added via sqlite-scripts will not make much of a difference. Though using sqlite with highly concurrent updates is not recommended. There is no locking mechanism within GHC itself. If possible would be interesting how your scenario behaves using PostgreSQL.
The scheduler phrase timedelta(minutes=random.randint(0, freq)) is to ensure liveliness (like soldiers marching out of sync on a bridge).
Would be interesting to know what the exact failures are and which version and environment (Docker?) of GHC you are using.
For one thing the GHC demo site demo.geohealthcheck.org runs stable for several years now though there are just 90 resources. The errored resources are usually in HTTP connectivity. That seems to come and go but usually the same resources. The latest version of GHC has improved on HTTP retry.
These kind of stress-tests are good to pop out concurrency errors e.g. in global data which is not supposed to be global as scheduler.py runs a highly multithreaded environment. If there is really a problem, please open an issue and we'll work from there.
(ok there is a Lock table used by the scheduler, but only to ensure one thread is running per Resource, in theory one could even run multiple scheduler-processes, as may happen when using some HTTP runners and scheduler+webapp in single process).
jochemthart1
@jochemthart1

@justb4 Thanks for your quick answer.

I have tried both sqlite and PostgreSQL, but unfortunately that made no difference.
I am on version 0.8.3 and have tried both with and without docker.
The scheduler and webapp are running in seperate processes.
The error I get is most: Found no WMS layers or Found no TMS layers or Found no WFS features types. Sometimes a http 502 error.

With 500 resources, a run_frequency of 120 minutes has a failure rate of 0.1% for me so I can imagine that the demo with 90 resources per 60 minutes would have a very low chance of giving these errors. Btw, 500 resources on 60 minutes had a failure rate of around 7%.

I still can't wrap my head around the fact that resources added through the interface have never given me these same errors (yet). Maybe I should run a test adding a resource through interface and then clearing the run table in the DB and restarting GHC to see if they start giving errors then.

I will open an issue for it