import of service dependencies
-
ktservices
- Posts: 19
- Joined: Mon Mar 26, 2012 6:20 am
- Location: Germany
- Contact:
Re: import of service dependencies
i googled my problem and found a similar issue here:
http://www.nagiosql.org/forum8/german-f ... ncies.html
It's a post in german forum, maybe you can use a translator to understand. the post describes a very similar problem and the problem seems not be solved, because of "servicedependencies are considered to be not as important". the post is more than 3 years old, i dont know if the problem is fixed in the current version of nagiosql and what version of nagiosql is used in Nagios XI. could this be the fault?
one of the first replies on my post was you can not recreated the error. did you test to import servicedependencies to a newly created host with services, already available with the same name at an existing host?
http://www.nagiosql.org/forum8/german-f ... ncies.html
It's a post in german forum, maybe you can use a translator to understand. the post describes a very similar problem and the problem seems not be solved, because of "servicedependencies are considered to be not as important". the post is more than 3 years old, i dont know if the problem is fixed in the current version of nagiosql and what version of nagiosql is used in Nagios XI. could this be the fault?
one of the first replies on my post was you can not recreated the error. did you test to import servicedependencies to a newly created host with services, already available with the same name at an existing host?
Re: import of service dependencies
OK, here's how I tested the import of service dependencies - let me know if I misunderstood the scenario:
1. I have a host, named "Windows7" with bunch of services, already created and I don't have any service dependencies defined at the moment.
2. I placed my config ("test.cfg") in the "/usr/local/nagiosxi/tools/xiprepimport.php orig/" directory, ran the "xiprepimport.php" tool, and imported the newly created "test.cfg" in the "/usr/local/nagios/etc/cfgprep/" directory via the web interface.
I applied configuration, and went to see if the new service dependency was indeed imported properly.
1. I have a host, named "Windows7" with bunch of services, already created and I don't have any service dependencies defined at the moment.
2. I placed my config ("test.cfg") in the "/usr/local/nagiosxi/tools/xiprepimport.php orig/" directory, ran the "xiprepimport.php" tool, and imported the newly created "test.cfg" in the "/usr/local/nagios/etc/cfgprep/" directory via the web interface.
Code: Select all
[root@testbox cfgprep]# pwd
/usr/local/nagios/etc/cfgprep
[root@testbox cfgprep]# ll ./orig
total 4
-rw-r--r-- 1 root root 761 Feb 20 12:31 test.cfg
[root@testbox cfgprep]# php /usr/local/nagiosxi/tools/xiprepimport.php orig/test.cfg
[root@testbox cfgprep]# ll
total 8
drwxrwsr-x 2 apache nagios 4096 Feb 20 12:31 orig
-rw-r--r-- 1 root nagios 702 Feb 20 12:38 test.cfgCode: Select all
define servicedependency {
dependent_host_name Windows7
dependent_service_description AMD External Events Utility,Avg. Disk Bytes/Read,Avg. Disk sec/Read,Bytes Total per second,Check Connections,CPU Usage,Disk Read Time,Disk Writes per sec,Drive C: Disk Usage,Drive D: Disk Usage,Encrypting File System _EFS_,
Explorer,License Status,Logon Errors,Memory Usage,Mount Point,Page File Usage,Physical Memory,Server Work Queues,Split IO/Sec,Total Processes,Uptime
host_name Windows7
service_description Ping
inherits_parent 1
execution_failure_criteria w,u,c,
notification_failure_criteria w,u,c,
dependency_period 24x7
}You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
ktservices
- Posts: 19
- Joined: Mon Mar 26, 2012 6:20 am
- Location: Germany
- Contact:
Re: import of service dependencies
thanks for the detailed explanation.
is the host "windows7" the only host in your nagios xi?
i did also have no problems with the first host on my nagios xi. the problem comes with the second host with the same services and the same servicedependencies.
is the host "windows7" the only host in your nagios xi?
i did also have no problems with the first host on my nagios xi. the problem comes with the second host with the same services and the same servicedependencies.
Re: import of service dependencies
No, this is not the only host I have on my test box. However, I don't have another host with the same services. Anyway, I am going to clone this host, along with its services, and will try to import another file with the same service dependencies. Most probably I will get back to you on Monday, since today we are working remotely due to a snow storm.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
ktservices
- Posts: 19
- Joined: Mon Mar 26, 2012 6:20 am
- Location: Germany
- Contact:
Re: import of service dependencies
could you already perform the test with an other maschine on your testsystem?
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: import of service dependencies
Are you sure the PING service exists for localhost? (it is case sensitive)ktservices wrote:i did a simple test on my testserver. It's VM on KVM with a rather fresh installation of nagios xi and only a vew hosts with a few checks.
I added to the existing host a new check. The new check has the same name as another check on an other host already has.
i created manually a file with the following content under this directory "/usr/loca/nagios/etc/nagioscore_mig":
define servicedependency{
host_name localhost
service_description PING
dependent_host_name localhost
dependent_service_description Apache-Webserver
execution_failure_criteria w,u,c
notification_failure_criteria w,u,c
}
Then i imported this file as described in this document http://assets.nagios.com/downloads/nagi ... nto_XI.pdf:
- importing the file >> OK
- writing and verifing the config files >> OK
- apply configuration >> OK
then i took a look at legacy ccm and found a new servicedependency for "localhost" and under "Dependent Services" is "Apache-Webserver" is written. But when i open the servicedependency is "Dependent Services" empty. It seems, only parts of the servicedependency are imported and the configuration is not completed. Both of my Nagios-XI Servers do the same, even the rather new installed Testserver with the newest avaialable Version of Nagios XI 2012 R2.9.
What is the error?
-
ktservices
- Posts: 19
- Joined: Mon Mar 26, 2012 6:20 am
- Location: Germany
- Contact:
Re: import of service dependencies
yes, service "PING" exists for localhost (all letters in uppercase)
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: import of service dependencies
We're testing a few things on this subject, we will get in touch with you tonight or tomorrow on our findings. Could you possibly provide us with the script you are using to generate these files?
-
ktservices
- Posts: 19
- Joined: Mon Mar 26, 2012 6:20 am
- Location: Germany
- Contact:
Re: import of service dependencies
the script which generates these files do some special things for us, for example the server names changes and the script corrects them and so on. but you can see the script generates a correct result.
Mr. Miltchev would do a further test with a cloned machine and then import servicedependencies. What is the result of the test? Could you reconstruct our problem?
Mr. Miltchev would do a further test with a cloned machine and then import servicedependencies. What is the result of the test? Could you reconstruct our problem?
Re: import of service dependencies
I was able to recreate the issue. It's really weird... my test file got imported just fine and the service dependencies were all written to the config, however the "dependent_service_description" definition was missing from the CCM (and Legacy CCM)... After adding the service via the CCM/Legacy, the "missing" service was added to the database.
I will be filing an internal bug report on the issue. Feel welcome to add anything, or provide some extra info. If you post a bug report on our public tracker (http://tracker.nagios.com), I will link it to our internal bug report.
I will be filing an internal bug report on the issue. Feel welcome to add anything, or provide some extra info. If you post a bug report on our public tracker (http://tracker.nagios.com), I will link it to our internal bug report.
Be sure to check out our Knowledgebase for helpful articles and solutions!