Skip to content

Commit

Permalink
update the readme of smartcl plugin
Browse files Browse the repository at this point in the history
Signed-off-by: Guillaume <[email protected]>
  • Loading branch information
gthvn1 committed Jan 27, 2025
1 parent 378dd8d commit 09469f8
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,17 +152,26 @@ $ xe host-call-plugin host-uuid=<uuid> plugin=lsblk.py fn=list_block_devices

## Smartctl parser

A xapi plugin to get information and health of physical disks on the host
This XAPI plugin provides information and health details for the physical disks on the host.

It uses the `smartctl --scan` command to retrieve the list of devices. For devices managed by
MegaRAID, the device names may be identical. To handle this, the plugin returns information
for each unique "name:type" pair.

The plugin parses the JSON output from the `smartctl` command to gather information and health
data. As a result, it requires a version of `smartctl` capable of producing JSON output.
This functionality is available in **XCP-ng 8.3**, but not in **XCP-ng 8.2**.

### `information`:
```
xe host-call-plugin host-uuid=<uuid> plugin=smartctl.py fn=information
{"/dev/sdf": {"power_on_time": {"hours": 9336}, "ata_version": {"minor_value": 94, "string": "ACS-4 T13/BSR INCITS 529 revision 5", "major_value": 2556}, "form_factor": {"ata_value": 3, "name": "2.5 inches"}, "firmware_version": "SVQ02B6Q", "wwn": {"oui": 9528, "naa": 5, "id": 65536604056}, "smart_status": {"passed": true}, "smartctl": {"build_info": "(local build)", "exit_status": 0, "argv": ["smartctl", "-j", "-a", "/dev/sdf"], "version": [7, 0], "svn_revision": "4883", "platform_info": "x86_64-linux-4.19.0+1"}, "temperature": {"current": 35}, "rotation_rate": 0, "interface_speed": {"current": {"sata_value": 3, "units_per_second": 60, "string": "6.0 Gb/s", "bits_per_unit": 100000000}, [...] }
{"/dev/sdf:sat": {"power_on_time": {"hours": 9336}, "ata_version": {"minor_value": 94, "string": "ACS-4 T13/BSR INCITS 529 revision 5", "major_value": 2556}, "form_factor": {"ata_value": 3, "name": "2.5 inches"}, "firmware_version": "SVQ02B6Q", "wwn": {"oui": 9528, "naa": 5, "id": 65536604056}, "smart_status": {"passed": true}, "smartctl": {"build_info": "(local build)", "exit_status": 0, "argv": ["smartctl", "-j", "-a", "/dev/sdf"], "version": [7, 0], "svn_revision": "4883", "platform_info": "x86_64-linux-4.19.0+1"}, "temperature": {"current": 35}, "rotation_rate": 0, "interface_speed": {"current": {"sata_value": 3, "units_per_second": 60, "string": "6.0 Gb/s", "bits_per_unit": 100000000}, [...] }
```

### `health`:
```
xe host-call-plugin host-uuid=<uuid> plugin=smartctl.py fn=health
{"/dev/sdf": "PASSED", "/dev/sdg": "PASSED", "/dev/sdd": "PASSED", "/dev/sde": "PASSED", "/dev/sdb": "PASSED", "/dev/sdc": "PASSED", "/dev/sda": "PASSED"}
{"/dev/sdf:sat": "PASSED", "/dev/sdg:sat": "PASSED", "/dev/sdd:sat": "PASSED", "/dev/sde:sat": "PASSED", "/dev/sdb:sat": "PASSED", "/dev/sdc:sat": "PASSED", "/dev/sda:sat": "PASSED"}
```

## Netdata
Expand Down

0 comments on commit 09469f8

Please sign in to comment.