status.cgi is slow (about 5s)

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
kardokip
Posts: 2
Joined: Wed May 25, 2016 1:31 pm

status.cgi is slow (about 5s)

Post by kardokip »

Hello,
I monitoring about 400 hosts and 4000 services. Nagios server havent performance problems. I used for helps for helpdesk variable notes:

Code: Select all

define host {
            use                        xxx-template-vmw-windows-server;
            host_name             XXX-XXXWIN62SVAD00;
            alias                       XXX-XXXWIN62SVAD00;
            address                  192.168.1.10;
            notes                     <p align=left><b>Big Express AD</b><br />$_HOSTXXX_HOST_HLP_00$</p>
            notification_period PO-PA_6:00-18:00
            check_command     check-host-alive
}
where $_HOSTXXX_HOST_HLP_00$ is defined in template (which is used by xxx-template-vmw-windows-server):

Code: Select all

define host {
    name                       help-hosts
    register                    0
    XXX_HOST_HLP_00    In time PO-PA_6:00-18:00 call to Mr. Smith
}
My status.dat have about 150MB. When I remove all macros, its about 0.5s

I want to have 1 help (notes) for 20 hosts the same (another help for 100 services etc..), how can I do it without macro, which slows down cgi scripts?
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: status.cgi is slow (about 5s)

Post by tmcdonald »

You might consider using templates for this: https://assets.nagios.com/downloads/nag ... tance.html
Former Nagios employee
kardokip
Posts: 2
Joined: Wed May 25, 2016 1:31 pm

Re: status.cgi is slow (about 5s)

Post by kardokip »

Hello, I dont understand how to do it exactly.

Example: I have 2 hosts, one is Active Directory, one is MSSQL. In note I want have
- AD server: "Active Directory - try to start all automatic services, when failed Monday - Sunday 6:00 - 22:00 escalate to Mr. Smith"
- MSSQL server: "MSSQL 2008 - Monday - Sunday 6:00 - 22:00 escalate to Mr. Smith"

the text "Monday - Sunday 6:00 - 22:00 escalate to Mr. Smith" I want to have in variable, is it possible?
Locked