How does Nagios monitoring work?