are you set on using pnp4nagios or you willing to try something else for ex the following
Which is using nagios rest api.