My dataset information is not updated until i restart the integration, what can i do to make the information to automatically update?
check your HA log for errors.
Found this in the log, but it doesnt help me to solve the problem. Any ideas?
TrueNAS *.*.*.* unable to fetch data "update/check_available" (500)
TrueNAS *.*.*.* unable to fetch data "system/info" (no_response)
Thats truenas reporting internal failure.check truenas itself for issues.
I love this integration. It is working great on my TrueNAS-SCALE-22.12.2.
I had a one question. Is there a way for me to tell if a disk has failed? If so which of the disk attributes do I need to check. I donât see a online attribute for disks.
Basically I want to map out the 24 disk bays in my server and map the drive letters to the correct bay so if a disk fails I will know which bay the disk that failed is in.I have noted the serial number of each disk and what bay they are installed in. So I can manually create a grid in my dashboard that matches my server layout and then I can just indicate my drive status using the icon color red or green, but in order to do that I will need to know what attribute change will reflect the disk status.
There are health sensors under System device.
Disks themselves dont have such flag in truenas, they may just disappear. It would require pool layout output instead of disks, but thats not useful for automation itself.
Also, you can have disk failing or pool issue with disk being âgreenâ in layout (I have such case right now by a chance). Always go by pool health and investigate specific issue manually.
Too bad TrueNAS doesnât make the last smart test results available via the api.
I think it does. Did you check?
I am currently looking and checking in the TrueNAS Forum.
If I can access that info I can run short self tests regularly and that should give me enough info to create a simple grid layout of the physical server drive configuration(my server has 12 bays 3 bays vertically by 4 horizontally) and have a visual indicator to let me know which bay the the drive that is failing, or has failed is in.
Smart tests can be scheduled using truenas GUI.
To get info on request, you can use /smart/test API endpoint.
I was able to successfully retrieve the last smart test results bu using:
curl -X GET -H "Authorization: Bearer <API Key>" http://<trueNAS IP or host name>/api/v2.0/smart/test/results
the response I got was as follows for each of my 20 disks:
{
"tests": [
{
"num": 1,
"description": "Background short",
"status_verbose": "Completed",
"segment_number": 64,
"lifetime": 65535,
"lba_of_first_error": null,
"status": "SUCCESS"
},
{
"num": 2,
"description": "Background short",
"status_verbose": "Completed",
"segment_number": 64,
"lifetime": 3,
"lba_of_first_error": null,
"status": "SUCCESS"
},
{
"num": 3,
"description": "Reserved(7)",
"status_verbose": "Completed",
"segment_number": 48,
"lifetime": 3,
"lba_of_first_error": null,
"status": "SUCCESS"
},
{
"num": 4,
"description": "Background short",
"status_verbose": "Completed",
"segment_number": 64,
"lifetime": 1,
"lba_of_first_error": null,
"status": "SUCCESS"
}
],
"current_test": null,
"identifier": "{serial_lunid}S0M35Q0T_5000c5007703628b",
"name": "sdu",
"subsystem": "scsi",
"number": 16704,
"serial": "S0M35Q0T",
"lunid": "5000c5007703628b",
"size": 600127266816,
"description": "",
"transfermode": "Auto",
"hddstandby": "ALWAYS ON",
"advpowermgmt": "DISABLED",
"togglesmart": true,
"smartoptions": "",
"expiretime": null,
"critical": null,
"difference": null,
"informational": null,
"model": "ST600MM0006",
"rotationrate": 10000,
"type": "HDD",
"zfs_guid": "4331329417788955794",
"bus": "SCSI",
"devname": "sdu",
"enclosure": null,
"supports_smart": null,
"pool": null,
"disk": "sdu"
}
@Tomaae , do you think this is something you could add to you excellent integration?
Of course the user would have to run regular smart tests in order for it to be useful in detecting failing or failed disks.
I have discussed possibilities of adding my integrations to core at length with Frenck, but it would be very difficult.
There is just too much code, and this integration it very small compared to my mikrotik integration for example.
HACS probably suits it better due to my development style and I can respond and support it much more effectively with smaller github repository.
Probably, I will look into it for next version.
Created feature request for you at github #82
whatâs new in TrueNAS-13.0-U5.1 and where is the changelog to be find? why is there no information on github about the new releases? latest version seems to be v1.2.3 according to the github repo.
You are asking at wrong place, this is HA truenas integration.
For truenas change log, go to their site. its all there.
omfg, thanx! thatâs correct indeed! I should disable this kind of notification, it fooled meâŠ
hmm, what you seen is nas update sensor then.
you can update devices directly fron HA using this integration. or just use that as a notification that new version has been released.