Comments (15)
The template for the client.json is located here - https://github.com/sstarcher/docker-sensu/blob/master/templates/client.json.tmpl
I would recommend running the container and changing the entrypoint to /bin/sh so you can run the start command yourself and capture the client.json to verify that it's valid.
If you don't intend to use the template that this container provides I would recommend overwriting it with your file ./client-conf/client.json:/etc/sensu/config.json"
from docker-sensu.
Looking at the docs the template requires
CLIENT_NAME *no default*
CLIENT_ADDRESS *no default*
from docker-sensu.
I did override it. Check the volumes section under the client definition in the docker-compose.yml file. Is this what you mean? Thanks!
- "./client-conf/client.json:/etc/sensu/config.json"
from docker-sensu.
Close, but not correct.
You overwrote /etc/sensu/config.json
not /etc/sensu/conf.d/client.json
from docker-sensu.
Ok ,I did that and I still get the same error. Not only that, the file I mounted on /etc/sensu/conf.d/client.json gets changed by this:
{
"client": {
"socket": {
"bind": "127.0.0.1"
},
"name": "51f83f494049",
"address": ,
"deregister": true,
"subscriptions": [
"all"
,"default"
],
"keepalive": {
"thresholds": {
"warning": 120,
"critical": 180
},
"handler": "default"
}
}
}
{"timestamp":"2017-06-25T14:48:49.358825+0000","level":"fatal","message":"config file must be valid json","file":"/etc/sensu/conf.d/client.json","error":"unexpected comma at line 7, column 17 [parse.c:575]"}
It looks like its not letting me use my own config file and instead it wants me to set all those env variables. Was it supposed to be like that?
from docker-sensu.
Looks like it blindly processes the templates.
- You can either try and set the 2 values it wants and let sensu merge your configuration file in addition to the default config.
- You can replaced the original template with your file and it should copy it to the correctly location.
from docker-sensu.
https://github.com/sstarcher/docker-sensu/blob/master/Dockerfile#L32
from docker-sensu.
I'm gonna try to create a new client definition using only environment variables and I'll let you know how it goes.
from docker-sensu.
If you set the 2 required variables it should merge your file with the templated file.
from docker-sensu.
Confirmed. You have to set up those variables in the docker-compose.yml file. You can't just use a configuration file. Thanks! It works now.
from docker-sensu.
I have the same problem and error .
But I don't get what you did for this purpose.
Can you tell me how you made that work?
from docker-sensu.
Hi @amirhmi ! If you read above, you can see that what I did was set up those environment variables on my docker-compose.yml
CLIENT_NAME: 'something'
CLIENT_ADDRESS: '127.0.0.1'
from docker-sensu.
Can I run that with docker run and only change env variables?
from docker-sensu.
Yeah. With -e
from docker-sensu.
thank you very much
@arecalde-edrans
from docker-sensu.
Related Issues (20)
- server container not executing handlers HOT 3
- Server defaulting to rabbitmq HOT 2
- Handling sensu-install without build-essentials HOT 3
- Sensu not writing to /var/log/sensu/... HOT 1
- docker-compose up failing for client_1 HOT 2
- Would love an 0.29 tagged release. HOT 1
- Consider switching to the sensu-install tool HOT 6
- Manage multiples datacenters with uchiwa HOT 8
- Add port for sensu-client HOT 2
- All my config is vanished after mounting it
- Gem issues with example docker-compose.yml during client container initialization HOT 7
- Files overwritten on mount HOT 5
- RUNTIME_INSTALL causes server container to crash. HOT 6
- 1.0.0 is using end of life Ubuntu Zesty HOT 3
- sstarcher/sensu:latest container has rebuilt 14 times and counting in the last 24 hours HOT 1
- Upgrade to 1.4? HOT 1
- Config file overwritten HOT 1
- Update to Sensu 1.6.1
- Using sensu-client to check the machine where container is running HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-sensu.