Welcome to the Hailo Community!
When you use the HailoRT CLI some commands allow you to measure the temperature e.g.,
hailortcli run model.hef --measure-temp
In your own code you can use the HailoRT APIs. Have a look at the HailoRT User guide. You can download that from the Developer Zone. Look for
hailort::Device::get_chip_temperature()