How to show server informations by pie chart

I want to create a pie chart to show server online or offline informations.

for example, I have 500 server, and 10 of them is offline. The pie chart will show " 98% is online, 2% is offline".