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

Create a Complete Snapshot via API #8830

Closed
mritzmann opened this issue Apr 27, 2020 · 6 comments
Closed

Create a Complete Snapshot via API #8830

mritzmann opened this issue Apr 27, 2020 · 6 comments
Assignees
Labels

Comments

@mritzmann
Copy link

Question summary

Hi! I don't think my question is too difficult, but I couldn't find anything special about it (except this issue #217). I would like to export a snapshot via API. It should be possible to import the snapshot.

My API request looks like this:

$ curl "http://localhost:19999/api/v1/data?chart=system.cpu&before=0&after=-600" >> /tmp/test.snapshot

In response I receive a JSON file. If I now import the file in Netdata Ui, I get the following error message: Failed to parse this file!

If I interpret the JSON file correctly, an export with /api/v1/data is not the same as an export via the Ui. Is there a parameter I have forgotten? Or maybe there is another way to create an export via curl that I can import later? Thanks & Sorry for the stupid question. Have a nice day!

OS / Environment
  • Netdata: 1.12.0-1+deb10u1
  • OS: Debian 10.3
Component Name
Expected results

Via HTTP request (curl) a file should be exported that can be imported into Netdata Ui later.

@mritzmann mritzmann added no changelog Issues which are not going to be added to changelog question labels Apr 27, 2020
@mritzmann
Copy link
Author

mritzmann commented May 12, 2020

I found this #309 (comment):

(..) that snapshots are saved on your computer (not the server) and cannot be triggered programmatically. -- Nov 13 2017, ktsaou

If this information is still current, this issue is no longer a question but a feature request. :-)

@ilyam8
Copy link
Member

ilyam8 commented May 12, 2020

@jacekkolasa please take a look

@stale
Copy link

stale bot commented Jun 11, 2020

This issue has been inactive for 30 days. It will be closed in one week, unless it is updated.

@stale stale bot added the stale label Jun 11, 2020
@jacekkolasa
Copy link
Contributor

hi @mritzmann , i confirm - the snapshot exported via UI has different structure than data?chart= call. It has more other data, like chart metadata, metrics for other charts, hostname, etc. It is unfortunately now impossible to export snapshot without UI. It would be a nice feature to have, i agree!

@jacekkolasa
Copy link
Contributor

cc @dim08

@jacekkolasa jacekkolasa added area/web feature request New features and removed no changelog Issues which are not going to be added to changelog question stale labels Jun 11, 2020
@ilyam8
Copy link
Member

ilyam8 commented Jul 30, 2021

duplicate of #9872

@ilyam8 ilyam8 closed this as completed Jul 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants