yet anorther verification quesdtion(newb)
yet anorther verification quesdtion(newb)
Sorry lads, but so far I'm not seeing why I continue to get this after a vanilla system(Ubuntu 12..nothing else)
Read main config file okay...
Processing object config file '/usr/local/nagios/etc/objects/commands.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/contacts.cfg'...
Error: Unexpected token or statement in file '/usr/local/nagios/etc/objects/contacts.cfg' on line 1.
Error processing object config files!
all I changed in that file is:
define contact{
contact_name nagiosadmin ; Short name of user
use generic-contact ; Inherit default values from generic-contact template (defined above)
alias Nagios Admin ; Full name of user
email myEmailAddy@...com
}
Thanks much..
Rich
Read main config file okay...
Processing object config file '/usr/local/nagios/etc/objects/commands.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/contacts.cfg'...
Error: Unexpected token or statement in file '/usr/local/nagios/etc/objects/contacts.cfg' on line 1.
Error processing object config files!
all I changed in that file is:
define contact{
contact_name nagiosadmin ; Short name of user
use generic-contact ; Inherit default values from generic-contact template (defined above)
alias Nagios Admin ; Full name of user
email myEmailAddy@...com
}
Thanks much..
Rich
Re: yet anorther verification quesdtion(newb)
Is there anything else in that file, particularly at the top?
Otherwise, try adding a space after: define contact
Otherwise, try adding a space after: define contact
Re: yet anorther verification quesdtion(newb)
thanks for the reply, but I'm striking out:
here's the relevant section...any idears?
# Define a host for the local machine
define host{
use localhost ; Name of host template to use
host_name myHostName
alias localhost
address 127.0.0.1
}
Command output is:
Processing object config file '/usr/local/nagios/etc/objects/commands.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/contacts.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/timeperiods.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/templates.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/localhost.cfg'...
Error: Template 'localhost' specified in host definition could not be not found (config file '/usr/local/nagios/etc/objects/localhost.cfg', starting on line 25)
Error processing object config files!
here's the relevant section...any idears?
# Define a host for the local machine
define host{
use localhost ; Name of host template to use
host_name myHostName
alias localhost
address 127.0.0.1
}
Command output is:
Processing object config file '/usr/local/nagios/etc/objects/commands.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/contacts.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/timeperiods.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/templates.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/localhost.cfg'...
Error: Template 'localhost' specified in host definition could not be not found (config file '/usr/local/nagios/etc/objects/localhost.cfg', starting on line 25)
Error processing object config files!
Re: yet anorther verification quesdtion(newb)
Well, you got farther this time. Have you defined a template with the name "localhost"? What does your hosttemplates.cfg look like?rgouette wrote: Error: Template 'localhost' specified in host definition could not be not found (config file '/usr/local/nagios/etc/objects/localhost.cfg', starting on line 25)
Error processing object config files![/b][/i]
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: yet anorther verification quesdtion(newb)
Have you defined a template with the name "localhost"? Nope!Well, you got farther this time. Have you defined a template with the name "localhost"? What does your hosttemplates.cfg look like?
What does your hosttemplates.cfg look like? I searched, and didn;t find onea them....
thanks for the help mate...
R
Re: yet anorther verification quesdtion(newb)
You will have to create a template for the host or instead use the generic one:
Code: Select all
use generic-host
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: yet anorther verification quesdtion(newb)
forgive the newbiness, but are you referring to:
localhost.cfg?
if so, it exists, but the hostname line is currently set to the machines hostname.
R
localhost.cfg?
if so, it exists, but the hostname line is currently set to the machines hostname.
R
Re: yet anorther verification quesdtion(newb)
Hi rgouette,
There should be a .cfg file called templates.cfg.
There are predefined templates in here which make defining hosts in your main .cfg files a lot neater.
In your message earlier you posted the following:
For a localhost, the standard definition is as follows:
The section which says "use local-server" is referring to the template "local-server" found in templates.cfg.
Hope this clears things up a bit =)
Kind Regards,
Gary Shergill
There should be a .cfg file called templates.cfg.
There are predefined templates in here which make defining hosts in your main .cfg files a lot neater.
In your message earlier you posted the following:
Code: Select all
define host{
use localhost ; Name of host template to use
host_name myHostName
alias localhost
address 127.0.0.1
}
Code: Select all
define host{
use local-server ; Name of host template to use. This host definition will inherit all variables that are defined in (or inherited by) the linux-server host template definition.
host_name localhost
alias localhost ; You can choose your own alias if you wish, such as the actual host name
address 127.0.0.1
}
Hope this clears things up a bit =)
Kind Regards,
Gary Shergill
Re: yet anorther verification quesdtion(newb)
ok...
Thanks so much for all your help fellas.
In my desparation, I deleted /etc/nagios then ran:
sudo apt-get install -y nagios3
than simply followed the instructions...
I'm now runnign Nagios...
Rich
Thanks so much for all your help fellas.
In my desparation, I deleted /etc/nagios then ran:
sudo apt-get install -y nagios3
than simply followed the instructions...
I'm now runnign Nagios...
Rich
Re: yet anorther verification quesdtion(newb)
Fair enough. I will lock this thread. If you have new issues, just open a new thread and we will help you there.
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.