How to read Nagios data from a 3rd party solution?

Hi,

I read in Nagios documentation that it is possible to write performance data on a text file using host_perfdata_file_template and service_perfdata_file_template

I would like to use this feature to extract the value of each metric at from an external solution that is able to collect and analyze metrics

Do you know if this file is written on agent or server?

Anyone already used this feature?

Is it otherwise possible to interrogate the database? Is the schema public?

Thanks,