Skip to content

Grafana #30

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

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,33 @@ DEFAULT_HOST_SECRET=8201e33f60093f2ce49f1abe6be8*****
URL_LIST=[{"name":"localhost","url":"http://localhost","priority":4},{"name":"github.com","url":"https://github.com","priority":4}]
ZBX_CONFIG={"authentication_type":0,"ok_period":"1d"}
ZBX_ADMIN_USERS=[{"name":"user","password":"password"},{"name":"user1","password":"password"}]
GF_SECURITY_ADMIN_PASSWORD=grafana
GF_AUTH_LDAP_ENABLED=false
GF_AUTH_LDAP_ALLOW_SIGN_UP=true
#####Grafana`s LDAP Config Environments#####
#[[servers]]
LDAP_GF_HOST=172.17.0.1
LDAP_GF_PORT=389
LDAP_GF_USE_SSL=false
LDAP_GF_START_TLS=false
LDAP_GF_SKIP_VERIFY=false
LDAP_GF_BIND_DN=cn=admin,dc=example,dc=org
LDAP_GF_BIND_PASSWORD=admin
LDAP_GF_SEARCH_FILTER=(cn=%s)
LDAP_GF_SEARCH_BASE_DNS=dc=example,dc=org
#[servers.attributes]
LDAP_GF_NAME=giveName
LDAP_GF_SURNAME=sn
LDAP_GF_USERNAME=cn
LDAP_GF_MEMBER_OF=memberOf
LDAP_GF_EMAIL=email
#[[servers.group_mappings]]
LDAP_GF_GROUP_DN_ADMIN=cn=admins,dc=example,dc=org
LDAP_GF_ORG_ROLE_ADMIN=Admin
#[[servers.group_mappings]]
LDAP_GF_GROUP_DN_EDITOR=cn=users,dc=example,dc=org
LDAP_GF_ORG_ROLE_EDITOR=Editor
#[[servers.group_mappings]]
LDAP_GF_GROUP_DN_VIEWER=*
LDAP_GF_ORG_ROLE_VIEWER=Viewer

13 changes: 13 additions & 0 deletions Dockerfile.grafana
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
ARG GRAFANA_VERSION=6.2.2

FROM grafana/grafana:${GRAFANA_VERSION}

USER root

ENV GF_INSTALL_PLUGINS=alexanderzobnin-zabbix-app

COPY ./scripts/run.sh /

RUN chmod +x /run.sh

ENTRYPOINT [ "/run.sh" ]
3 changes: 2 additions & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/xenial64"
config.vm.network "private_network", ip: "192.168.33.102"
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.network "forwarded_port", guest: 3000, host: 3000
config.vm.provider "virtualbox" do |vb|
vb.memory = "2048"
end
Expand Down Expand Up @@ -33,7 +34,7 @@ Vagrant.configure("2") do |config|
iotop \
htop \
mc
#

echo "Getting docker-compose from official repository..."
if [ ! -e "/usr/local/bin/docker-compose" ]; then
curl -L https://github.com/docker/compose/releases/download/1.16.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
Expand Down
10 changes: 10 additions & 0 deletions configuration/dashboard.yaml.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: 1

providers:
- name: Zabbix
folder:
folderUid:
type: file
updateIntervalSeconds: 60
options:
path: /var/lib/grafana/dashboards
18 changes: 18 additions & 0 deletions configuration/datasource.yaml.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: 1

datasources:
- name: Zabbix
type: alexanderzobnin-zabbix-datasource
access: proxy
url: {0}/api_jsonrpc.php
isDefault: true
jsonData:
username: admin
password: {1}
trends: true
trendsFrom: 7d
trendsRange: 4d
cacheTTL: 1h
alerting: true
version: 1
editable: false
Loading