https://github.com/chimeracoder/znc-kibana-playbooks
https://github.com/chimeracoder/znc-kibana-playbooks
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/chimeracoder/znc-kibana-playbooks
- Owner: ChimeraCoder
- Created: 2014-11-02T17:16:34.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-04-30T23:14:52.000Z (almost 11 years ago)
- Last Synced: 2025-01-28T13:52:07.698Z (about 1 year ago)
- Size: 219 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
# ZNC, logstash, and Kibana for Docker with SSL
* Run the [ZNC](http://znc.in) IRC Bouncer in a Docker container.
* View chat logs using Kibana
## Set up ZNC bouncer
1. *(optional)* If restoring from a backup, uncomment the first task in `znc.yml` (If necessary, update znc.yml to use the local path to the backup directory, which defaults to `znc-default`)
2. *(optional* Generate a self-signed SSL cert by running
````sh
$ ansible-playbook genkeys.yml
````
After you have done this, simply run
````sh
$ ansible-playbook znc.yml
````
If you do not already have a `znc.conf` file in your znc config directory, you need to generate one from the interactive prompt. After running the above playbook once, run the following command on the remote server as root:
````sh
$ docker run --rm -it -v /home/znc/.znc:/znc-data chimeracoder/docker-znc-ssl --makeconf --datadir=/znc-data
````
Don't start the ZNC server when it asks you if you want to, since we'll be starting it as a daemon (so it runs in the background). When you're done generating the config, start the service `systemctl start znc.service`.
## Set up log view with Kibana
1. Create the directory `~/kibanaconf` on the remote server
2. Create signed SSL key/cert pair named `nginx.crt` and `nginx.key` and place them in the `~/kibanaconf` directory. (*You probably want to use the same SSL certificate for Kibana and the ZNC server if you intend to run these on the same host*)
3. Set two local environment variables, `USERNAME` and `PASSWORD`, which will be used to restrict access to the log view
If you have less than 512 MB of RAM on the server, you may want to enable swap, as logstash tends to use around 500 MB when reading in logs for the first time:
````sh
$ ansible-playbook kibana.yml -vvvv
````
After you have done this, simply run
````sh
$ ansible-playbook kibana.yml -vvvv
````