Web interface Error:Could not read object configuration data
Re: Web interface Error:Could not read object configuration
I added the users to the Nagios group, and it didn't change anything. I did manage to work through the initial problem, so now I can see the services page. However, now I'm back to the same state I was on my first VM: the check_by_ssh service is getting the Error 127.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Web interface Error:Could not read object configuration
lets post these permissions
Code: Select all
ls -ld /usr/local/nagios
ls -ld /usr/local/nagios/libexec
ls -l /usr/local/nagios/libexec/check_by_ssh
Re: Web interface Error:Could not read object configuration
Well, sorry to take the whole discussion off track, but I messed something else up on the system and had to reinstall the OS. I got everything back to where it was, and this time even got the two machines to SSH without requiring a password. Running the check_by_ssh command manually works just fine, but when I try to run it automatically it says "(Return code of 255 is out of bounds)". Now, as for those permissions scottwilkerson was asking for:
Outputs:
Code: Select all
ls -ld /usr/local/nagios
ls -ld /usr/local/nagios/libexec
ls -l /usr/local/nagios/libexec/check_by_ssh
Code: Select all
drwxr-xr-x. 9 root root 4096 Aug 7 15:24 /usr/local/nagios
drwxrwxr-x. 3 nagios nagios 4096 Aug 7 16:30 /usr/local/nagios/libexec
-rwxr-xr-x. 1 nagios root 53328 Aug 17 2012 /usr/local/nagios/libexec/check_by_ssh
Re: Web interface Error:Could not read object configuration
Can you post the working cli command and then the current command/check definitions?
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: Web interface Error:Could not read object configuration
What I'm trying to do is make nagios run the check_file_count service to see how many files are in a directory, and for now I'm just using "testfile" as the dir I'm searching. So, the working command would be this:abrist wrote:Can you post the working cli command and then the current command/check definitions?
Code: Select all
/usr/local/nagios/libexec/check_by_ssh -H 192.168.10.92 -C "/usr/local/nagios/libexec/check_file_count -t=file -s=no -wt=high -w 4 -c 5 -p=no /etc/testfile" -t 30 -E
As for the command/check definitions, I did it in a bit of a funny way. I figured I would only be using this command once, so I just wrote the entire thing with all the arguments filled out into commands.cfg, then had just the make of the command in services.cfg. I'm not quite sure about the syntax of the $ARG's and such in the commands.cfg file, so I thought I would go deal with that once I got the damn thing working first. Here's the relevant portion of commands.cfg:
Code: Select all
# 'check_file_count' command definition
define command{
command_name check_file_count
command_line $USER1$/check_by_ssh -H 192.168.10.92 -C "/usr/local/nagios/libexec/check_file_count -t=file -s=no -wt=high -w 4 -c 5 -p=no /etc/testfile" -t 30 -E
}
Code: Select all
define service{
use generic-service
host_name projectapps01
service_description File count
check_command check_file_count
}
Any possibility that could be causing the problem? If so, how would I format the command in the config file?
Re: Web interface Error:Could not read object configuration
What linux distro are you running?
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: Web interface Error:Could not read object configuration
As I said earlier, CentOS 6.0.abrist wrote:What linux distro are you running?
Re: Web interface Error:Could not read object configuration
I don't think so, your definitions look right.zander_2 wrote:Any possibility that could be causing the problem?
The above line is why the check always checks the same box: the hostname of the checked host is not passed to check_by_ssh. It is hardcoded to the IP.zander_2 wrote:command_line $USER1$/check_by_ssh -H 192.168.10.92 -C "/usr/local/nagios/libexec/check_file_count -t=file -s=no -wt=high -w 4 -c 5 -p=no /etc/testfile" -t 30 -E
}
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: Web interface Error:Could not read object configuration
Yeah, that makes sense. Still, nothing that could be causing the error. Anyone else have any input? I'd really like to get this fixed.
-
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Web interface Error:Could not read object configuration
When you are doing this via cli, are you running as root or the nagios user? You very possibly need to do this as the nagios user, or accept the ssh key as the nagios user via a manual ssh over first. Otherwise the plugin will just fail. However the 255 out of bounds is still a bit strange.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.