Hello Everyone,
I am pretty new to Nagios XI. (I did not touch Nagios before.) Recently, I've read a lot of documents about Nagios, however, I am still not able to get it well. (Some of docs are old and not right for Nagios XI.)
Q1:
I follow some documents to review and modify nagios.cfg file, I did see one section: Objects - Unmodified.
#cfg_file=/usr/local/nagios/etc/objects/contacts.cfg
#cfg_file=/usr/local/nagios/etc/objects/commands.cfg
... ...
but they are commented.
1: I am not sure, if I need to un-comment those files.
In nagios.cfg file, there is another section: Objects exported from nagiosql.
cfg_file=/usr/local/nagios/etc/contacts.cfg
cfg_file=/usr/local/nagios/etc/objects/commands.cfg
... ...
2: don't understand what the difference is between Objects - Unmodified and Objects Exported from nagiosql.
Q2
under /nagios/etc folder, there is no objects folder in Nagios XI, however, a lot of docs mentioned this folder, which made me confused very much.
1: Do I need to create this folder?
2: what is the function of this folder?
Q3
After reading the Admin manual of Nagios XI, I was told not to modify files under /usr/loacl/nagios/etc directly, since all of these files will be overwritten by CCM. The ONLY way I can do is to put configuration files into import folder. Then import these files through CCM.
1: Is this right way to apply changes?
Q4
Since I am really new guy to Nagios, I hope someone could give me some instruction or direction, so that I can follow it to setup one device, such as a router. I tried wizard, failed to setup port monitoring and traffic checking...I really want to setup this through command line, do not like GUI. Hope you guys can give me some directions, I am pretty sure I can learn fast.
Thanks a lot.
Newbie Needs Help on Nagios XI
Re: Newbie Needs Help on Nagios XI
Q1. 1&2) The commented out unmodified objects are defaults from the original default nagios.cfg. These should not be un-commented as the nagiosql mysql database manages the configs. If you want to manage configs by hand, use the "static" directory.
Q2. 1) No.
2) There is no function, in which docs have you seen this folder referenced?
Q3. 1) Maybe. By default, you should manage the configs through the ccm (core config manager). Any changes you make in the ccm are written to the nagiosql DB. When you "apply configuration" in the cmm, it will create a snapshot, write out the configs, verify them, and then restart nagios. If you wish to edit configs by hand, create them in the static directory and edit them there. Importing is only used when trying to import nagios core configs into XI.
Q4. 1) The gui must be used to configure port and bandwidth checking (at least to make use of mrtg and to make reports about the bandwidth). You could use the /usr/local/nagios/etc/static directory to build your configs by hand, but then you will need to configure mrtg and the port checks by hand.
What issue did you run into when you tried to run the switch/router wizard?
Q2. 1) No.
2) There is no function, in which docs have you seen this folder referenced?
Q3. 1) Maybe. By default, you should manage the configs through the ccm (core config manager). Any changes you make in the ccm are written to the nagiosql DB. When you "apply configuration" in the cmm, it will create a snapshot, write out the configs, verify them, and then restart nagios. If you wish to edit configs by hand, create them in the static directory and edit them there. Importing is only used when trying to import nagios core configs into XI.
Q4. 1) The gui must be used to configure port and bandwidth checking (at least to make use of mrtg and to make reports about the bandwidth). You could use the /usr/local/nagios/etc/static directory to build your configs by hand, but then you will need to configure mrtg and the port checks by hand.
What issue did you run into when you tried to run the switch/router wizard?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Newbie Needs Help on Nagios XI
Hi abrist, thank you so much. I still have some questions about your responses.
Q2: Here is a link: http://nagios.sourceforge.net/docs/3_0/ ... uters.html. In this article, you can the something related to objects folder under section: Configuring Nagios.
In this article, they show us a configuration file called switch.cfg which I do not find in Nagios XI. And just in this article, I have a feeling that if you want to modify some config files, just go to objects folder, since all config files are there.
Q3: Static Folder,
"If you wish to edit configs by hand, create them in the static directory and edit them there."
1: I created a file called host.cfg in the static directory and added one new host in this file. And then reload nagios. However, this new host was not shown up in the WEB GUI. Is my way right to add a host or service? (I also plan to create a service file called service.cfg. )
I noticed there are two directories, hosts and services in the directory of usr/local/nagios/etc/ in Nagios XI. Do these two directories matter when I create host.cfg and service.cfg in the static directory?
" What issue did you run into when you tried to run the switch/router wizard?" I realized that I may have some issue on my router site, I will try this one again and let you know if I still have troubles.
Once again, really appreciate your support.
Q2: Here is a link: http://nagios.sourceforge.net/docs/3_0/ ... uters.html. In this article, you can the something related to objects folder under section: Configuring Nagios.
In this article, they show us a configuration file called switch.cfg which I do not find in Nagios XI. And just in this article, I have a feeling that if you want to modify some config files, just go to objects folder, since all config files are there.
Q3: Static Folder,
"If you wish to edit configs by hand, create them in the static directory and edit them there."
1: I created a file called host.cfg in the static directory and added one new host in this file. And then reload nagios. However, this new host was not shown up in the WEB GUI. Is my way right to add a host or service? (I also plan to create a service file called service.cfg. )
I noticed there are two directories, hosts and services in the directory of usr/local/nagios/etc/ in Nagios XI. Do these two directories matter when I create host.cfg and service.cfg in the static directory?
" What issue did you run into when you tried to run the switch/router wizard?" I realized that I may have some issue on my router site, I will try this one again and let you know if I still have troubles.
Once again, really appreciate your support.
Re: Newbie Needs Help on Nagios XI
Q2:
EDIT: You are using XI, Ignore this point.
Q3:
The static directory will not show up in the Core Config Manager. Its purpose is to give administrators a way to edit files manually as opposed to using the web interface. The Nagios service will still need to be restarted like with using Core before they will show up. The .../hosts/ and .../services/ directories should not be touched; stick to the .../static/ directory.
Depending on how you installed Nagios (source vs package manager), and on what OS, the directories may be different.Note: These instructions assume that you've installed Nagios according to the quickstart guide. The sample configuration entries below reference objects that are defined in the sample config files (commands.cfg, templates.cfg, etc.) that are installed when you follow the quickstart.
EDIT: You are using XI, Ignore this point.
Q3:
The static directory will not show up in the Core Config Manager. Its purpose is to give administrators a way to edit files manually as opposed to using the web interface. The Nagios service will still need to be restarted like with using Core before they will show up. The .../hosts/ and .../services/ directories should not be touched; stick to the .../static/ directory.
Former Nagios employee
Re: Newbie Needs Help on Nagios XI
Hi tmcdonald,
Thanks for your reply.
1: My nagios XI was installed through VMware image: VMware Virtual Machine(64-bit) (http://library.nagios.com/library/produ ... loads/main)
2: Still about static directory.
What I mean is that host I created in the static directory is not shown up in the web GUI. How can I monitor it since it's not shown up in the web GUI. My question is simple, for example, I want to add a router to monitor using CLI not GUI. Where should I begin with? Would you please give me some step instruction, which I can follow to do it.
My question may be not smart. I am sorry. For now, I feel that I am in the front of door of Nagios XI. I need someone can show me how to get inside.
Thanks,
Thanks for your reply.
1: My nagios XI was installed through VMware image: VMware Virtual Machine(64-bit) (http://library.nagios.com/library/produ ... loads/main)
2: Still about static directory.
What I mean is that host I created in the static directory is not shown up in the web GUI. How can I monitor it since it's not shown up in the web GUI. My question is simple, for example, I want to add a router to monitor using CLI not GUI. Where should I begin with? Would you please give me some step instruction, which I can follow to do it.
My question may be not smart. I am sorry. For now, I feel that I am in the front of door of Nagios XI. I need someone can show me how to get inside.
Thanks,
Re: Newbie Needs Help on Nagios XI
I *think* Trevor was implying that configs created in /usr/local/nagios/etc/static will not show up in the CCM, though they should show up in all the standard places for reporting, status and metrics in XI. If the host config is correct, and nagios was restarted, it should display in the UI. Can you post the host config?net_m wrote:What I mean is that host I created in the static directory is not shown up in the web GUI.
Is there a reason why you do not want to use the CCM to create your checks instead of writing the configs by hand?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Newbie Needs Help on Nagios XI
abrist wrote:I *think* Trevor was implying that configs created in /usr/local/nagios/etc/static will not show up in the CCM, though they should show up in all the standard places for reporting, status and metrics in XI. If the host config is correct, and nagios was restarted, it should display in the UI. Can you post the host config?net_m wrote:What I mean is that host I created in the static directory is not shown up in the web GUI.
Is there a reason why you do not want to use the CCM to create your checks instead of writing the configs by hand?
Hi abrist,
Sorry for this delay response. I was so busy last week. Yes, finally, I changed my mind to use GUI to configure this my monitoring system.
Thanks for your support.
Re: Newbie Needs Help on Nagios XI
Did you have any questions about the CCM or are we set to close the thread?
Former Nagios employee
Re: Newbie Needs Help on Nagios XI
Yes, you can close this thread. Thanks a lot.tmcdonald wrote:Did you have any questions about the CCM or are we set to close the thread?