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

How to add timestamp to the data pushed to metric by promtail #14055

Open
bboxerxiaofeng opened this issue Sep 5, 2024 · 1 comment
Open

Comments

@bboxerxiaofeng
Copy link

Currently, the following configuration in promtail can expose data to metrics
xxx.yaml
- metrics:
GRPCDelay:
source: GRPCDelay
type: Gauge
config:
action: set

promtail_custom_GRPCDelay{Login="100001",Time="2024-09-05 15:05:10.670",filename="/data/server/logs/tradingservice.log"} 2.4105026

Now I want to add a timestamp after the value. How to modify the yaml file?
For example, the logs exposed to the metric are as follows:
promtail_custom_GRPCDelay{Login="100001",Time="2024-09-05 15:05:10.670",filename="/data/server/logs/tradingservice.log"} 2.4105026 1692241058502(time)

@JStickler
Copy link
Contributor

Questions have a better chance of being answered if you ask them on the community forums.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants