CloudWatch Get Uptime Metrics

Currenty, I am trying to build dashboard for monitoring my instance on AWS/EC2.

I am using CloudWatch as my data source and I have a problem on get the metrics of uptime. I can get the uptime through terminal by following this case below:

Can anybody provide me guidance on how to get the uptime metrics from CloudWatch to Grafana ?