public class NCPrometheusExporter extends Object implements NCLifecycle
NCLifecycle
for usage information.
When running Prometheus you will need to supply it a configuration file. Here's an example of the minimal YAML configuration you can use to monitor both the server and the probe:
global: scrape_interval: 5s external_labels: monitor: 'nlpcraft' scrape_configs: - job_name: 'prometheus' scrape_interval: 5s static_configs: - targets: ['localhost:9090'] - job_name: 'nlpcraft-server' scrape_interval: 5s static_configs: - targets: ['localhost:8888'] - job_name: 'nlpcraft-probe' scrape_interval: 5s static_configs: - targets: ['localhost:8889']See documentation on how to configure probe life cycle components, default values, etc.
Constructor and Description |
---|
NCPrometheusExporter() |
Modifier and Type | Method and Description |
---|---|
void |
onInit()
Called before lifecycle component is used and just after its creation.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onDiscard
public void onInit()
NCLifecycle
onInit
in interface NCLifecycle
Copyright © 2020 NLPCraft. All rights reserved.