-
Notifications
You must be signed in to change notification settings - Fork 515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to use Env variables in riemann.config - Riemann 0.3.2 #956
Comments
These env variables are not visible from init system. If you have |
@sanel How do I access the variable once I set it in /etc/default/riemann? I tried How does the riemann daemon know to look for variables in /etc/default/riemann on Ubuntu? I am using Systemd to start and manage the riemann daemon. |
Can you show the output of |
You must add an |
@tarunngidwani ah, systemd is ignoring this file too :S As @faxm0dem mentioned, you can use this riemann.service (you can find it in /etc/systemd/system somewhere):
or set env variable directly in riemann.service:
Make sure to reload systemd after editing this file. |
If you are going to edit |
Another approach is to have separate ;; /etc/riemann/files/config.clj
(ns files.config)
;; put all global variables here
(def GRAPHITE_HOST "graphite-mc") ;; /etc/riemann/riemann.config
(use 'files.config)
;; usual riemann.config stuff and GRAPHITE_HOST is visible here
(let [index (index)]
...
) This way, you can distribute or put all |
Thank you @sanel @faxm0dem for all your help. Adding the env var to For Debian-based OSs:
For RHEL-based OSs:
|
I am unable to access the value of an env variable in my riemann.config file. When I run riemann using
systemctl start riemann
the logs indicate that the value of the env variable is null.I have exported the env variable and tried adding to the /etc/profile and/or /etc/environments with no luck. In the riemann.config file, I have tried accessing it directly using
System/getenv
and created a def to hold the env variables value.I have attached some screenshots of setup. Any help would be much appreciated.
The text was updated successfully, but these errors were encountered: