Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Push metrics to Pushgateway

License

NotificationsYou must be signed in to change notification settings

prom-client-net/prom-client-metricpusher

Repository files navigation

cinugetnugetcodecovlicense

Pushgateway

Sometimes when it is not possible to pull e.g. - nodes behind LB or there is a worker like daemon or windows service that does not have HTTP endpoint still there is way to push your metrics to Pushgateway server that you can install fromhere.

Install

dotnet add package Prometheus.Client.MetricPusher

Use

Examples

One push. You can use Timer for regularly push to Pushgateway:

varpusher=newMetricPusher(newMetricPusherOptions{Endpoint="http://localhost:9091",Job="pushgateway",Instance="instance"});awaitpusher.PushAsync();

Push with Auth:

varpusher=newMetricPusher(newMetricPusherOptions{Endpoint="http://localhost:9091",Job="pushgateway",Instance="instance",AdditionalHeaders=newDictionary<string,string>{{"Authorization","Bearer "+accessToken}}});

Background server:

varpusher=newMetricPusher(newMetricPusherOptions{Endpoint="http://localhost:9091",Job="pushgateway"});varworker=newMetricPushServer(pusher);worker.Start();// codeworker.Stop();

Contribute

Contributions to the package are always welcome!

License

All contents of this package are licensed under theMIT license.

About

Push metrics to Pushgateway

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

 
 
 

Contributors8

Languages


[8]ページ先頭

©2009-2025 Movatter.jp