how to restart any one PC with help of prometheus?
I’m assuming you are meaning that you want to restart something if an alert happens.
This is possible, although you need to be careful with your queries (to ensure you don’t end up DoSing yourself). Generally what you’d have is an alert that goes into Alertmanager and is sent to a custom webhook. That webhook can then run whatever is needed to restart the resource you want (e.g. it could run some cloud API calls or SSH to a machine and run some commands). This webhook can be written in the language of your choice, as it just needs to listen for a HTTP request. Make sure you think carefully about authentication, to ensure only Alertmanager can trigger such restarts.