Question: how nagios monitoring tool works?
Answer: Nagios basically collects the statistics of your server (either using agent like NRPE, check_mk or via SNMP ) and send the alert to you if the value of the metric is above some predefined threshold.