Page 1 of 1

status.cgi is slow (about 5s)

Posted: Fri Mar 24, 2017 8:40 am
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?

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

Posted: Fri Mar 24, 2017 1:45 pm
by tmcdonald
You might consider using templates for this: https://assets.nagios.com/downloads/nag ... tance.html

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

Posted: Tue Mar 28, 2017 3:51 am
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?

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

Posted: Tue Mar 28, 2017 1:55 pm
by avandemore