NagiosXI - Ghosts in the .cfg files?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ianduncangtt
Posts: 5
Joined: Thu Apr 02, 2015 4:52 pm

NagiosXI - Ghosts in the .cfg files?

Post by ianduncangtt »

Hi Nagios -

Please find attached my system's profile info in the .zip.

I'm running into a problem - when I try to Apply Changes, it will intermittently show the following error:
---
Error: Service has no hosts and/or service_description (config file '/usr/local/nagios/etc/services/localhost-TotalProcesses.cfg', starting on line 16)
BUT - that file doesn't exist on the filesystem. And I deleted that service - and I checked to make sure it was deleted from the tbl_service. There's nothing I can find that would create this problem, or for that text to even exist anywhere.
# ls /usr/local/nagios/etc/services/localhost-TotalProcesses.cfg
ls: cannot access /usr/local/nagios/etc/services/localhost-TotalProcesses.cfg: No such file or directory
# grep -r "TotalProc" /usr/local/nagios/etc/
What do you suggest?

Thanks much for your help - otherwise we're having a great time with the product,

- Ian
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NagiosXI - Ghosts in the .cfg files?

Post by lmiltchev »

Do you get any hits when you search for "total" in the CCM (under "Services" and no filter selected for the config name)? Have you tried running the Write Config Tool in the following order?

CCM->Tools->Write Config Files->Delete->Write->Verify

Do you get any errors after clicking on "Write" or "Verify"?

Do you have any errors/crashed tables in the mysql log?

Code: Select all

tail /var/log/mysqld.log
Be sure to check out our Knowledgebase for helpful articles and solutions!
ianduncangtt
Posts: 5
Joined: Thu Apr 02, 2015 4:52 pm

Re: NagiosXI - Ghosts in the .cfg files?

Post by ianduncangtt »

Thanks for the quick reply -

The MySQL looks clean .. I checked all the tables with my utility and they are good.
---

Code: Select all

150706  5:49:45 InnoDB: Initializing buffer pool, size = 128.0M
150706  5:49:45 InnoDB: Completed initialization of buffer pool
150706  5:49:45 InnoDB: highest supported file format is Barracuda.
150706  5:49:45  InnoDB: Waiting for the background threads to start
150706  5:49:46 Percona XtraDB (http://www.percona.com) 5.5.40-MariaDB-36.1 started; log sequence number 1597945
150706  5:49:46 [Note] Plugin 'FEEDBACK' is disabled.
150706  5:49:46 [Note] Server socket created on IP: '0.0.0.0'.
150706  5:49:46 [Note] Event Scheduler: Loaded 0 events
150706  5:49:46 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.41-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server
We're trying to load in thousands of hosts directly to the database, and then use the "Apply Configuration" for it to write the files and restart the services. This works great for a few hundred hosts/services - but i'm finding that when I try to load more than 1000 at a time, the strange error occurs. (i would understand a timeout or error related to thresholds or resources .. but when it references a non-existent file is when I got worried : )

When I click on "Write Config Files" - it just goes to a white screen. (probably too many files to write?) So i'm using the scripts/reconfigure_nagios.sh tool, and that works after a couple tries.

Do you know the best way to write the individual hosts and services files from the CCM codebase? I'm thinking that writing the files before trying to restart will be easier on the system. We'll end up with about 40k hosts and services when all is done - the server load looks good so far - the mod_gearman is working well!

Thanks again! : )

- Ian
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NagiosXI - Ghosts in the .cfg files?

Post by lmiltchev »

We're trying to load in thousands of hosts directly to the database, and then use the "Apply Configuration" for it to write the files and restart the services. This works great for a few hundred hosts/services - but i'm finding that when I try to load more than 1000 at a time, the strange error occurs. (i would understand a timeout or error related to thresholds or resources .. but when it references a non-existent file is when I got worried : )
Hm-m, I wonder if you are hitting the 1000 limit for the "max_input_vars"...

http://php.net/manual/en/info.configuration.php

Add the following line on the bottom of the "/etc/php.ini" file:

Code: Select all

max_input_vars = 100000
and restart apache:

Code: Select all

service httpd restart
Let me know if this helped.
Be sure to check out our Knowledgebase for helpful articles and solutions!
ianduncangtt
Posts: 5
Joined: Thu Apr 02, 2015 4:52 pm

Re: NagiosXI - Ghosts in the .cfg files?

Post by ianduncangtt »

Thanks - I think you are on to something .. but you got me started thinking - and I was able to put in a quick fix : )

I wrote a replacement for scripts/restart_nagios_with_export.sh that doesn't use Apache - its PHP from the CLI, and that seems to be working great.

Thanks again for the quick replies - really appreciate knowing that you guys are there for us,

- Ian
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: NagiosXI - Ghosts in the .cfg files?

Post by ssax »

Glad you got that working, can we mark this as resolved and lock the topic?
Locked