Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
particularly confusing. I wondered if anybody here could clarify what's happening - or what's supposed to happen, rather?
TIA
Matthias
EDIT:
I've created the said directory manually now. Nagios places a directory "check_snmp" there, containing statefiles related to rate calculation. Consequently, the checks are working now. I assume Nagios is supposed to use /var/www/var for that, rather than /var.
Hulluna humpasta taas
Minä olen hulluna humpasta taas
Minen toivu koskaan, luotan voimaan votkan
Hulluna humpasta taas
I believe your issue eg /var/550 is due to an HTTP 550 response which the check_snmp plugin eval's a the subdirectory to create it's transitional state in. Can you try to run the command from the CLI with increased verbosity as whatever user you were doing the previous command with?
Please list the output of the result.
You may also consult the apache and nagios log's for more information.
Nagios is trying to set up temporary directories in /var, but fails because the user _nagios has no right to crate directories in /var. I think it's supposed to be somehwere in /var/www (this is where OpenBSD's jail for apache is located). What I am probably looking for is the place where I can change the target path for those temporary files and directories.
Hulluna humpasta taas
Minä olen hulluna humpasta taas
Minen toivu koskaan, luotan voimaan votkan
Hulluna humpasta taas
Are you installing from a port or package? I assume so since the version is older.
The information that this is running in a jail is quite critical. Are you using FreeBSD w/ jails or is this an OpenBSD chroot AFAIK OpenBSD doesn't support jails.
avandemore wrote:Are you installing from a port or package? I assume so since the version is older.
That's correct, it's an installation from the 4.0.8 package provided by OpenBSD 6.0. This is another issue, because 4.0.8 apparently contains bugs that have been fixed in 4.1.x.
avandemore wrote:The information that this is running in a jail is quite critical.
Jail was the wrong word - it's an OpenBSD -chroot installation that places the whole thing into (IMO) rather bizarre paths. Everything resides in /var/www.
# mount
/dev/sd0a on / type ffs (local)
/dev/sd0k on /home type ffs (local, nodev, nosuid)
/dev/sd0d on /tmp type ffs (local, nodev, nosuid)
/dev/sd0f on /usr type ffs (local, nodev)
/dev/sd0g on /usr/X11R6 type ffs (local, nodev)
/dev/sd0h on /usr/local type ffs (local, nodev, wxallowed)
/dev/sd0j on /usr/obj type ffs (local, nodev, nosuid)
/dev/sd0i on /usr/src type ffs (local, nodev, nosuid)
/dev/sd0e on /var type ffs (local, nodev, nosuid)
Hulluna humpasta taas
Minä olen hulluna humpasta taas
Minen toivu koskaan, luotan voimaan votkan
Hulluna humpasta taas
This is another issue, because 4.0.8 apparently contains bugs that have been fixed in 4.1.x.
True but you'll never get away from that tail chasing exercise. Also keeping on OS packages makes it easier to know when real critical errors show, and to address them.
Everything resides in /var/www
According to OpenBSD's hier(7), it's not totally out of bounds but something /usr/local/www/nagios would make more sense for non-config files.
In general, the permissions for Nagios directories and files should be <nagios user>:<web server group> 775 for cgi stuff, 775 for script/html dirs, and 664 for html script files.
The OpenBSD way makes sense when you look at it - and as long as you stick with it. I'd rather not go down the rabbit hole to change things here. The rights/missing directory issue was an easy thing to fix. But apparently, standard paths are not laid out somewhere in the config files, which makes Nagios write temporary files to bizarre locations. I wonder if this is a mistake somewhere in the config (which must have been modified by OpenBSD to point to their preferred hierarchy) which could easily be rectified.
Hulluna humpasta taas
Minä olen hulluna humpasta taas
Minen toivu koskaan, luotan voimaan votkan
Hulluna humpasta taas
We obviously can't make OSes follow our rules, but we might be able to make decisions they think are sane.
We generally suggest people compile from source if they are starting out. However, we don't have a migration process, so since you've started with OpenBSD packages, I would suggest you stay with that, unless you can find a very compelling reason to upgrade.