Can you query Nagios from command line for config info?

Is it possible to the query the live Nagios server from the O.S. command line to get config information?

Say I wanted to query my Nagios server for a listing of monitored hosts and the services on each host and get the result into a text file (that I could later munch on).

I know all the info is in the text config files, but we have a good sized installation, and a hierarchical configuration with inter-related config files. Not so easy to get a report, like the one I mention, by processing the config files.

Thanks for any advice…Lyle