kostya / eye

Process monitoring tool. Inspired from Bluepill and God.
MIT License
1.19k stars 89 forks source link

eye load does not update config when already started #208

Closed wollistik closed 6 years ago

wollistik commented 6 years ago

In your readme you write following:

If the eye daemon has already started and you call the load command, the config will be updated (into eye daemon). New objects(applications, groups, processes) will be added and monitored. Processes removed from the config will be removed (and stopped if the process has stop_on_delete true). Other objects will update their configs.

This is actually not the case. I have a config where I want to be able to control the presence of some process groups based on environment variables.

Sample config:

Eye.application :app do
  if ENV.fetch('FOO'){false}
    group :foo do
      ...
    end
  end
end

When I switch the environment variable and call eye load again the config in eye does not change.

kostya commented 6 years ago

env variables loaded into eye server only when it first start, and not updated anymore. config evaluated on eye server, so env variables not updated. https://github.com/kostya/eye/wiki/Using-ENV-variables-in-config

wollistik commented 6 years ago

OMG. RTFM...