Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

[dev.icinga.com #2083] expose ICINGA_* Env Vars also as NAGIOS_* to checks scripts #788

Closed
icinga-migration opened this issue Nov 15, 2011 · 8 comments

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/2083

Created by Tommi on 2011-11-15 21:14:22 +00:00

Assignee: Tommi
Status: Resolved (closed on 2012-03-04 12:32:26 +00:00)
Target Version: 1.7
Last Update: 2012-03-04 12:32:26 +00:00 (in Redmine)


currently, Icinga uses its own namespace for setting environment variables with prefix ICINGA*. But most 3thparty checks are written to use environment with namespace NAGIOS*. One of them is the popular check_oracle_health. Its some effort to change these scripts for Icinga and may break support. Additional icinga claims to be compatible with all nagios plugins. I suggest to export both, ICINGA_ and NAGIOS_ named environment variables from core.

Changesets

2011-11-23 20:47:33 +00:00 by Tommi 8d3ba99c9030c251b76ae0361bd22cdd5d46c0ee

Core:configure switch --enable-nagiosenv for naming environment variables #2083
refs #2083

2012-01-29 08:56:04 +00:00 by Tommi fe55291

Core:configure switch --enable-nagiosenv for naming environment variables #2083
refs #2083

Relations:

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2011-11-15 21:46:10 +00:00

environment variables can cause significant increase with cpu utilization and were therefore renamed and not just added. i get the point with compatibility, but in that case, i don't think, doubled env vars would make any sense in performance regards - neither in notifications, checkcommands nor eventhandlers.

if check_oracle_health does not support icinga env macros, someone might write a patch and send it to gerhard. i'm pretty sure he will add it.

@icinga-migration
Copy link
Author

Updated by Tommi on 2011-11-16 07:04:01 +00:00

This particular script was only one example. There are commercial plugins, which cant be changed, other developers are not willing to patch there code.
If the addition of the NAGIOS_* variables is really a problem at might be another approach to make the prefix configurable in icinga.cfg

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2011-11-16 08:41:35 +00:00

so? environment variables are just one of the methods being used. passing macros as parameters is also a known possiblity. i don't see the point that the compatibility is really broken. and environment macros are wel known as performance killer / memory leakers.

a configurable prefix might be good, but since this will affect the core globally, i'd opt for a later release with longer testing period.

unless you'll find a possible solution for that definition.

include/macros.h:#define MACRO_ENV_VAR_PREFIX                   "ICINGA_"

@icinga-migration
Copy link
Author

Updated by Tommi on 2011-11-24 18:59:54 +00:00

I've added a new configure option --enable-nagiosenv, which will set the prefix to NAGIOS_ if included, otherwise stay with ICINGA_. Works for me as expected. But running aclocal rebuilded the whole configure and i dont know, if this fits also on other systems . Atleast tap is screaming about missing AC_PROG_LIBTOOL

@icinga-migration
Copy link
Author

Updated by Tommi on 2011-11-24 19:01:28 +00:00

  • Category set to Installation
  • Status changed from New to Feedback
  • Assigned to set to Tommi
  • Done % changed from 0 to 100

please add to build test stage

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2011-11-24 19:09:54 +00:00

but not for 1.6, we will keep this on the plate for 1.7 ... i will merge after 1.6 is released.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2011-12-19 23:05:34 +00:00

  • Target Version set to 1.7

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2012-03-04 12:32:26 +00:00

  • Status changed from Feedback to Resolved

seen in 'next', works like expected as disabled by default.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant