-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add a Metric Point to a Metric #2576
Comments
Can you share your log file please? Looking at |
Hi. curl --request POST --url http://IP-Address/api/v1/metrics/6/points -H "X-Cachet-Token: sKWn3XXXXXXXXXP06em1" -H "Content-Type: application/json;" --data '{"value":1,"timestamp":"14:29:23"}' Terminal Response: Log Response: [2017-06-16 08:59:30] production.ERROR: InvalidArgumentException: Trailing data in /var/www/Cachet/vendor/nesbot/carbon/src/Carbon/Carbon.php:425 Could you assist me on this please. |
Hello, the reason is that you didn't specify the good timestamp. Try to pass a real timestamp ex:
|
Hi There, here is the terminal output: curl --request POST --url http://10.170.9.156/v1/metrics/6/points -H "X-Cachet-Token: sKWn3X0O1fLpY6P06em1" -H "Content-Type: application/json;" --data '{"value":"5.2","timestamp":"1497954204"}' Error 404Houston, We Have A Problem.Not Found
|
Hi, It's working for me now with the below command: curl --request POST --url http://10.170.9.156/api/v1/metrics/6/points -H "X-Cachet-Token: sKWn3X0O1fLpY6P06em1" -H "Content-Type: application/json;" --data '{"value":2.5,"timestamp":1497952190}' output: {"data":{"metric_id":6,"value":2,"created_at":"2017-06-20 15:19:50","updated_at":"2017-06-20 16:15:03","id":1}} Thank you, |
Your welcome ;)
What is your contributions for now ?
Sincerly,
Clément
Le 20 juin 2017 12:47 PM, "submah" <notifications@github.com> a écrit :
… Hi,
It's working for me now with the below command:
curl --request POST --url http://10.170.9.156/api/v1/metrics/6/points -H
"X-Cachet-Token: sKWn3X0O1fLpY6P06em1" -H "Content-Type: application/json;"
--data '{"value":2.5,"timestamp":1497952190}'
output:
{"data":{"metric_id":6,"value":2,"created_at":"2017-06-20
15:19:50","updated_at":"2017-06-20 16:15:03","id":1}}
Thank you,
Subrat
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2576 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABXgNkmrG1yvoH69RtjRhfCQ1xGBnWV-ks5sF6MsgaJpZM4N7AjJ>
.
|
Hi, How can i update the value data and the timestamp data dynamically to cached metric point. |
Hello,
sorry to come back to you so late. For dynamically update metric points, i
have implemented a function that take a json of points incoming and store
them into a metric. If you are interested i can share this functionality.
2017-06-20 14:04 GMT+02:00 submah <notifications@github.com>:
… Hi,
How can i update the value data and the timestamp data dynamically to
cached metric point.
please refer to the above data both the value and timestamp are static
data i.e. '{"value":2.5,"timestamp":1497952190}'. Could you suggest me
how can i dynamically update ?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2576 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABXgNscolK0e2kaInRdv31d1h0zJO_Trks5sF7VbgaJpZM4N7AjJ>
.
--
Clément Lesaulnier
06 52 86 55 74
https://github.com/clemaurny
https://fr.linkedin.com/in/clesauln
http://clemaurny.github.io/portfolio
|
We'd like to see a PR @clemaurny! |
I can sent you this feature, is it always needed?
Le 14 juil. 2017 19:12, "James Brooks" <notifications@github.com> a écrit :
We'd like to see a PR @clemaurny <https://github.com/clemaurny>!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2576 (comment)>,
or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABXgNqGVe578dIixrhwob7pKvETo_g1sks5sN6FigaJpZM4N7AjJ>
.
|
We'd love to see it. |
Hi,
I am trying to add a value to a predefined metrics, while executing the curl command with required parameters am getting the 400 errors. Here is the sample curl command
curl --request POST --url http://X.X.X.X/api/v1/metrics/{id}/points -H "X-Cachet-Token: xxxxxxxxxx" -H "Content-Type: application/json;" --data '{"value":1.34,"timestamp":"2017-06-15 14:52:23"}'
Output:
status":500,"title":"Internal Server Error","detail":"An error has occurred and this resource cannot be displayed."}]}
The text was updated successfully, but these errors were encountered: