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

Adding output to json to monitor status. #168

Open
don-rumata opened this issue Nov 29, 2021 · 3 comments
Open

Adding output to json to monitor status. #168

don-rumata opened this issue Nov 29, 2021 · 3 comments

Comments

@don-rumata
Copy link

Hi!

I want to monitor installation status via curl\jq\watch (my computer) + ocs_daemonon="lighttpd" (the Clonzilla instance). Can you add:

  • Log output in json format
  • The default path was /var/www/html/partclone.log.json
  • The default refresh was 1 or 5 sec

Thanks in advance.

@Thomas-Tsai
Copy link
Owner

Hello,
there are some points I am not clear about.

  1. what do you mean by "installation status"
  2. ocsXXX is for Clonezilla, so if you have some idea, please also send a message to Clonezilla teams.
  3. /var/log/partclone.log is for system administrator, I never check any log in JSON format. but we can consider creating JSON log to a different path.
  4. The refresh from partclone is TEXT/TUI only, you can change it using --UI-fresh
    -f,  --UI-fresh         Fresh times of progress

@don-rumata
Copy link
Author

don-rumata commented Nov 29, 2021

Снимок экрана_2021-11-29_15-07-23

what do you mean by "installation status"

This is when Clonezilla installs the OS on the computer using partclone.

I want to get all the data from the screenshot as an updatable json file which will be stored (and updated) in /var/www/html/ by default. To collect deploy statuses centrally with future wrappers.

ocsXXX is for Clonezilla

Yes, I remember. I wanted to show how I'm going to retrieve this file from a running Clonezilla+partclone instance.

P.S. Forgive my English, I use deepl.

UPD.

That's what I mean:

/var/www/html/partclone.log.json

{
  "partclone": {
    "vesion": "0.3.17",
    "site": "http://partclone.org",
    "action": "restore-image",
    "device": "/dev/sda1",
    "calculating-bitmap": {
      "human": "done",
      "bool": true
    },
    "file-system": "ntfs",
    "device-size": {
      "human": 51.9,
      "blocks": 14417919
    },
    "space-in-use": {
      "human": 25.9,
      "blocks": 6324579
    },
    "free-space": {
      "human": 33.2,
      "blocks": 8093340
    },
    "units-of-measurement": {
      "device": "GB",
      "block": "B",
      "rate": "MB/s",
      "process": "%",
      "elapsed": "HH:MM:SS",
      "remaining": "HH:MM:SS"
    },
    "block-size": 4096,
    "elapsed": "00:03:32",
    "remaining": "00:45:30",
    "rate": 528.24,
    "current-block": 460488,
    "total-block": 14417919,
    "data-block-process": 7.2,
    "total-block-process": 3.19
  }
}

@Thomas-Tsai
Copy link
Owner

thanks for the update. I could try to add this function.

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

No branches or pull requests

2 participants