Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose some basic catalog and config metrics to be exported by micrometer #226

Merged

Conversation

groldan
Copy link
Member

@groldan groldan commented May 13, 2022

Expose some basic catalog and config metrics to be exported by micrometer.

If spring-boot-actuator is present on the (GeoServer) application,
and the config propery geoserver.metrics.enabled=true (default),
the following metrics are exported through micrometer, with the
instance-id tag matching the info.instance-id value to ease
slicing by service when aggregating values on an external system.

  • geoserver.config.update_sequence: The configuration update sequence.
  • geoserver.catalog.added: Number of CatalogInfo objects added to
    this instance's Catalog
  • geoserver.catalog.removed: Number of CatalogInfo objects removed
    on this instance's Catalog
  • geoserver.catalog.modified: Number of modifications to CatalogInfo
    objects on this instance's Catalog

They can then be monitored at each instance's actuator endpoint. For
example:

curl -i http://192.168.0.21:8106/actuator/metrics/geoserver.config.update_sequence
HTTP/1.1 200
Content-Type: application/vnd.spring-boot.actuator.v3+json

{
  "name": "geoserver.config.update_sequence",
  "description": "GeoServer configuration update sequence",
  "baseUnit": "sequence",
  "measurements": [
    {
      "statistic": "VALUE",
      "value": 208.0
    }
  ],
  "availableTags": [
    {
      "tag": "instance-id",
      "values": [
        "web-ui:192.168.0.21:9106"
      ]
    }
  ]
}

References:

@groldan groldan added the feature New feature label May 13, 2022
@groldan groldan self-assigned this May 13, 2022
…eter

If `spring-boot-actuator` is present on the (GeoServer) application,
and the config propery `geoserver.metrics.enabled=true` (default),
the following metrics are exported through micrometer, with the
`instance-id` tag matching the `info.instance-id` value to ease
slicing by service when aggregating values on an external system.

* `geoserver.config.update_sequence`: The configuration update sequence.
* `geoserver.catalog.added`: Number of CatalogInfo objects added to
this instance's Catalog
* `geoserver.catalog.removed`: Number of CatalogInfo objects removed
on this instance's Catalog
* `geoserver.catalog.modified`: Number of modifications to CatalogInfo
objects on this instance's Catalog

They can then be monitored at each instance's actuator endpoint. For
example:

```
curl -i http://192.168.0.21:8106/actuator/metrics/geoserver.config.update_sequence
HTTP/1.1 200
Content-Type: application/vnd.spring-boot.actuator.v3+json

{
  "name": "geoserver.config.update_sequence",
  "description": "GeoServer configuration update sequence",
  "baseUnit": "sequence",
  "measurements": [
    {
      "statistic": "VALUE",
      "value": 208.0
    }
  ],
  "availableTags": [
    {
      "tag": "instance-id",
      "values": [
        "web-ui:192.168.0.21:9106"
      ]
    }
  ]
}
```
@groldan groldan force-pushed the feature/observability/updateSequence branch from d260871 to 7b601ff Compare May 13, 2022 02:55
@groldan groldan merged commit 038a5ec into geoserver:main May 13, 2022
@groldan groldan deleted the feature/observability/updateSequence branch May 13, 2022 03:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant