Page 1 of 1

Nagios API that can connect with any Angular application

Posted: Thu Apr 04, 2019 5:58 am
by Nisharunnisa
Hi Guys,
I am working for an organization, we want to Monitor our blogs, all our internal applications, remote hosts and all.
I know Nagios can do all of these ! Great thing Thanks for that to Nagios
I have a question like do we have any API of Nagios like which can perform Monitoring of all system metrics, collecting data and all the stuff whatever Nagios can do but it should display all these data on my application (a Web UI which is designed by our Organization using either angular or any other technology) instead of Nagios web Interface?
Do we have anything like this?
If yes someone can guide me or can give some links or so where I can refer it?
It will be very helpful !
Thank you :)

Re: Nagios API that can connect with any Angular application

Posted: Thu Apr 04, 2019 9:57 am
by lmiltchev
The Nagios XI backend API can output JSON. You should be able to import/view JSON in Angular. We don't have any "official" guides/documentation on how to do that, but I found these two posts that may help:

https://www.angularjswiki.com/angular/h ... n-angular/

https://stackoverflow.com/questions/469 ... cript-file

Re: Nagios API that can connect with any Angular application

Posted: Thu Apr 04, 2019 11:26 am
by Nisharunnisa
Thanks for the reply @lmiltchev , Can u just tell me this Nagios Backend API which you referred have the capability of monitoring all the devices, and system metrics which Nagios core has?

Re: Nagios API that can connect with any Angular application

Posted: Thu Apr 04, 2019 11:54 am
by lmiltchev
All of the data that is available in the Nagios web UI, will be also available via the API. Here's a small example of a JSON output/format:

Code: Select all

{
            "@attributes": {
                "id": "642"
            },
            "instance_id": "1",
            "host_name": "Windows7-WMI",
            "service_description": "CPU Usage",
            "is_active": "1",
            "config_type": "1",
            "display_name": "CPU Usage",
            "check_interval": "5",
            "retry_interval": "1",
            "max_check_attempts": "5",
            "first_notification_delay": "0",
            "notification_interval": "60",
            "passive_checks_enabled": "1",
            "active_checks_enabled": "1",
            "notifications_enabled": "1",
            ...           
        },