Configuration verification error


#1

Hello.
sorry for annoying anyone who has already answered this question but any help would be really appreciated
when i type in
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
i get the following error

/usr/local/nagios/bin/nagios/nagios.cfg: line 892: syntax error near
unexpected token |' /usr/local/nagios/bin/nagios/nagios.cfg: line 892:illegal_macro_output_chars=`~$:cry:ā€™"<>ā€™

thanks
robbie


#2

illegal_macro_output_chars=`~$:cry:ā€™"<>

my line looks the sameā€¦ (there are no quotes but i think this comes from the check outputā€¦
Try deleting the line and resinerting itā€¦ could be theres a special character somewhere hiddenā€¦ :frowning:

Luca


#3

Thanks for answering,i tried what yo said with no joy.its fairly annoying


#4

can anyone please put up the correct nagios.cfg & minimal.cfg files please


#5

this is the error im getting

[root@linux root]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.
cfg

Nagios 2.0b3
Copyright Ā© 1999-2005 Ethan Galstad (www.nagios.org)
Last Modified: 04-03-2005
License: GPL

Reading configuration dataā€¦

Running pre-flight check on configuration dataā€¦

Checking servicesā€¦
Error: There are no services defined!
Checked 0 services.
Checking hostsā€¦
Error: There are no hosts defined!
Checked 0 hosts.
Checking host groupsā€¦
Error: There are no host groups defined!
Checked 0 host groups.
Checking service groupsā€¦
Checked 0 service groups.
Checking contactsā€¦
Error: There are no contacts defined!
Checked 0 contacts.
Checking contact groupsā€¦
Error: There are no contact groups defined!
Checked 0 contact groups.
Checking service escalationsā€¦
Checked 0 service escalations.
Checking service dependenciesā€¦
Checked 0 service dependencies.
Checking host escalationsā€¦
Checked 0 host escalations.
Checking host dependenciesā€¦
Checked 0 host dependencies.
Checking commandsā€¦
Checked 16 commands.
Checking time periodsā€¦
Checked 1 time periods.
Checking extended host info definitionsā€¦
Checked 0 extended host info definitions.
Checking extended service info definitionsā€¦
Checked 0 extended service info definitions.
Checking for circular paths between hostsā€¦
Checking for circular host and service dependenciesā€¦
Checking global event handlersā€¦
Checking obsessive compulsive processor commandsā€¦
Checking misc settingsā€¦
Warning: Nothing specified for illegal_macro_output_chars variable!

Total Warnings: 1
Total Errors: 5


#6

Follow the docs and define a host and a service associated to the hostā€¦
now that you are getting only a warning for illegal_macro_output_chars you could try reinsertign at least some of the chars which were in the original stringā€¦

Luca


#7

First off, where are you files located?
/usr/local/nagios/bin/nagios/nagios.cfg
or
/usr/local/nagios/etc/nagios.cfg

You have 2 different paths in your topic.


#8

when i type in
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
i get the following error

/usr/local/nagios/bin/nagios/nagios.cfg: line 892: syntax error near
unexpected token `|ā€™
/usr/local/nagios/bin/nagios/nagios.cfg: line 892:


#9

usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
is the path, i appreciate the you getting back im still getting the same errors i looked over the permission any other ideas plz?


#10

Well, if you are getting the following error, than something is wrong with your file locations or definitions. Why does it say ā€œ/usr/local/nagios/bin/nagios/nagios.cfg: line 892: syntax errorā€ That is not where the nagios.cfg is supposed to be. You need to verify that is what the error is, since I wonā€™t be able to think past that gross error.

[quote=ā€œglynnerā€]Hello.
sorry for annoying anyone who has already answered this question but any help would be really appreciated
when i type in
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
i get the following error

/usr/local/nagios/bin/nagios/nagios.cfg: line 892: syntax error near
unexpected token |' /usr/local/nagios/bin/nagios/nagios.cfg: line 892:illegal_macro_output_chars=`~$:cry:ā€™"<>ā€™

thanks
robbie[/quote]


#11

I got it fixed.silly mistakes, moving on!quick question other then nagios.orgā€™s documents are there any other good web sites on nagios


#12

i have got to here but when i try to start nagios i get the following

root@linux root]

/usr/local/nagios/bin/nagios /usr/local/nagios/etc/nagios.cfg

Nagios 2.0b3
Copyright Ā© 1999-2005 Ethan Galstad (www.nagios.org)
Last Modified: 04-03-2005
License: GPL

Nagios 2.0b3 startingā€¦ (PID=13530)
Warning: Nothing specified for illegal_macro_output_chars variable!
sh: line 1: /check_load: No such file or directory
Warning: Return code of 127 for check of service ā€˜Current Loadā€™ on
host ā€˜localhostā€™ was out of bounds. Make sure the plugin youā€™re trying
to run actually exists.

[5]+ Stopped /usr/local/nagios/bin/nagios
/usr/local/nagios/etc/nagios.cfg
[root@linux root]#

Does any1 no website that helps witrh the issue as ive have googled it with no results
thanks


#13

can any1 explain what the following errors or what is missing?

[root@linux root]# /usr/local/nagios/bin/nagios /usr/local/nagios/etc/nagios.cfg

Nagios 2.0b3
Copyright Ā© 1999-2005 Ethan Galstad (www.nagios.org)
Last Modified: 04-03-2005
License: GPL

Nagios 2.0b3 startingā€¦ (PID=21794)
Warning: Nothing specified for illegal_macro_output_chars variable!
sh: line 1: /check_load: No such file or directory
Warning: Return code of 127 for check of service ā€˜Current Loadā€™ on
host ā€˜localhostā€™ was out of bounds. Make sure the plugin youā€™re trying
to run actually exists.
sh: line 1: /check_users: No such file or directory
Warning: Return code of 127 for check of service ā€˜Current Usersā€™ on
host ā€˜localhostā€™ was out of bounds. Make sure the plugin youā€™re trying
to run actually exists.
sh: line 1: /check_ping: No such file or directory
Warning: Return code of 127 for check of service ā€˜PINGā€™ on host
ā€™localhostā€™ was out of bounds. Make sure the plugin youā€™re
trying to run actually exists.
sh: line 1: /check_disk: No such file or directory
Warning: Return code of 127 for check of service ā€˜Root Partitionā€™ on
host ā€˜localhostā€™ was out of bounds. Make sure the plugin youā€™re trying
to run actually exists.
sh: line 1: /check_procs: No such file or directory
Warning: Return code of 127 for check of service ā€˜Total Processesā€™ on
host ā€˜localhostā€™ was out of bounds. Make sure the plugin youā€™re trying
to run actually exists.
sh: line 1: /check_load: No such file or directory


#14

This is due to the services u trying to run in the plugins are already define in minimal.cfg file. They actually exist in the checkcommands.cfg. Both bigger.cfg and minimal.cfg are sample files on how to define services, host, etc.

U can read more of these here: nagios.sourceforge.net/docs/2_0/xodtemplate.html


#15

Thank you so much for replying so quick,really appreciate it


#16

Hey np. We should help each other out. Started mine about 4 months ago. Someone help me with mine.

Yoda: To help others, Nagios users do they must.


#17

will try help.only a beginer only start nagios and linux 7 days ago


#18

[quote=ā€œedyimā€]Hey np. We should help each other out. Started mine about 4 months ago. Someone help me with mine.

Yoda: To help others, Nagios users do they must.[/quote]

Opps my mistake. I started in 4 weeks not months. :o


#19

cool well i trying to figure out how to fix whats wrong with mine but leave message if you stuck ill try help,no bother at all!


#20

What did you do to fix it? It helps nobody, if we donā€™t know what kind of little things people do, and how they fix them. Nothing is to little.