If your question is how to output the metric data from the Nagios plugin then please have a look at the Nagios plugin documentation:
https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/3/en/pluginapi.html
If your question is how to output the metric data from the Nagios plugin then please have a look at the Nagios plugin documentation:
https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/3/en/pluginapi.html