Page 1 of 1
NagiosXI - Ghosts in the .cfg files?
Posted: Mon Jul 06, 2015 2:28 am
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
Re: NagiosXI - Ghosts in the .cfg files?
Posted: Mon Jul 06, 2015 8:50 am
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?
Re: NagiosXI - Ghosts in the .cfg files?
Posted: Mon Jul 06, 2015 11:55 am
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
Re: NagiosXI - Ghosts in the .cfg files?
Posted: Mon Jul 06, 2015 12:57 pm
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:
and restart apache:
Let me know if this helped.
Re: NagiosXI - Ghosts in the .cfg files?
Posted: Mon Jul 06, 2015 11:00 pm
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
Re: NagiosXI - Ghosts in the .cfg files?
Posted: Tue Jul 07, 2015 9:33 am
by ssax
Glad you got that working, can we mark this as resolved and lock the topic?