[go: up one dir, main page]

0% found this document useful (0 votes)
194 views7 pages

Performance Dashboard

The document provides instructions for setting up Influxdb and Grafana on Windows, including downloading and installing the software, configuring authentication and authorization, backing up and restoring Influxdb data, migrating Grafana dashboards, and installing both applications as Windows services using NSSM.

Uploaded by

Narendra Kamma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
194 views7 pages

Performance Dashboard

The document provides instructions for setting up Influxdb and Grafana on Windows, including downloading and installing the software, configuring authentication and authorization, backing up and restoring Influxdb data, migrating Grafana dashboards, and installing both applications as Windows services using NSSM.

Uploaded by

Narendra Kamma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Influxdb Setup

Refer https://github.com/influxdata/influxdb

Download

"Standalone Windows Binaries (64-bit)" from


https://portal.influxdata.com/downloads#influxdb

Version 1.2.2 is available at


https://dl.influxdata.com/influxdb/releases/influxdb-1.2.2_windows_amd64.zip

Installation

1. Unzip downloaded file to <install directory>


nfluxdb.conf / Goto [Admin] section
2. Edit i
a. uncomment "enabled" flag. set it to true (enabled = true)
b. uncomment "bind-address" flag

> influxd.exe -config influxdb.conf

Verify

Browse http://localhost:8083
Influxdb Backup and Restore
Refer
docs.influxdata.com/influxdb/v1.2/administration/backup_and_restore/
stackoverflow.com/questions/27779472/export-data-from-influxdb

Note
1. These instructions applicable to data migration / nightly backups.
2. There i s no single command to backup all databases. One must backup
each database individually. A custom batch program may help.
3. Incremental backups are possible but not covered in this document

Backup
1. Connect to influxdb system
2. Go to command prompt and navigate to <influxdb-directory>

> Influxd.exe backup -database passport C:\backup\passport

> influxd backup -database passport -host apphealth.freeman.com:8088


C:\backup\passport

Restore
1. Connect to destination influxdb system
2. Stop influxdb service if running
3. Go to command prompt and navigate to <influxdb-directory>
4. If influxdb <install-drive> is C:
a. Note that, Influx data location is C:\var\lib\influxdb\data
b. Note that, influx meta location is C:\var\lib\influxdb\meta

> influxd.exe restore -metadir C:\var\lib\influxdb\meta C:\backup\passport

> influxd.exe restore -database passport -datadir C:\var\lib\influxdb\data


C:\backup\passport
Configuring Influxdb
Refer
https://docs.influxdata.com/influxdb/v1.2/query_language/authentication_and_a
uthorization/#set-up-authentication
https://docs.influxdata.com/influxdb/v1.2/query_language/authentication_and_a
uthorization/#grant-read-write-or-all-database-privileges-to-an-existing-user

Authentication and Authorization


1. Set auth-enabled = true in [http] section of influxdb.config
2. Restart Influxdb
3. Go to Web interface / CLI

Admin User

> CREATE USER "username" WITH PASSWORD 'password' WITH ALL PRIVILEGES

General User

REATE USER username W


> C ITH PASSWORD password
> G RANT [READ,WRITE,ALL] O N <database_name> TO <username>

Ex:
> CREATE USER "tomcat" WITH PASSWORD '123456'
> GRANT ALL ON passport to tomcat
Influxdb as a Windows Service
Influxdb is not a windows service. However, using NSSM we can install
Influxdb (in fact, any program) as a windows service
Ref https://nssm.cc/commands and https://nssm.cc/usage

1. Download latest NSSM


ontents to local disk. Ex: C:\nssm\win32
2. Extract c
3. Navigate n ssm directory with CLI

> Nssm.exe install influxdb

o Services and start influxdb service for the f


Go t irst time manually.
If s ervice is not starting for any reason, remove t he service and add again.

> Nssm.exe remove influxdb


Grafana Setup
Refer http://docs.grafana.org/installation/windows/

Download

"Latest stable package for windows" from


http://docs.grafana.org/installation/windows/

Version 4.2.0 is available at


https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.2.0.win
dows-x64.zip

Installation

1. Unzip downloaded file to <install directory>


Install directory>
2. Goto <
3. Copy c onfig/sample.ini to config/custom.ini

d <install directory>\bin
> c
> g rafana-server.exe

Grafana uses port 3000. Not ok? Change it in custom.ini

Unless you change custom.ini/[security], default admin account is admin/admin | You


can also change this later through UI

Grafana + LDAP: http://docs.grafana.org/installation/ldap/

Verify

Browse http://localhost:3000
Adjust p ort if you chose something else
Grafana Migration
These migration instructions are applicable to dashboards only
http://docs.grafana.org/reference/export_import

Currently grafana supports individual Dashboard export / import


Refer: https://github.com/grafana/grafana/issues/936#issuecomment-154372243
To perform export / import of all dashboards, write your own script

Export

1. Navigate to source grafana dashboard on browser


2. Click "Share" button on top navigation bar and choose Export option
3. [On export window] Save to file

Import

1. Navigate to destination grafana on browser


2. Open top left menu (Grafana icon)
3. Click Dashboards > Import
4. [On import window] Click button "Upload .json File"

Other

Alternatively, you can also Export / Import through URL pointing

1. Navigate to destination grafana on browser


2. Open top left menu (Grafana icon)
3. Click Dashboards > Import
4. [On import window] locate textbox labelled with ' Grafana.net Dashboard'
5. Paste the URL / ID of source dashboard that you w ant to copy
Grafana as a Windows Service
Grafana is not a windows service. However, using NSSM we can install Grafana
(in fact, any program) as a windows service
Ref https://nssm.cc/commands and https://nssm.cc/usage

4. Download latest NSSM


ontents to local disk. Ex: C:\nssm
5. Extract c
6. Navigate n ssm directory with CLI (C:\nssm\win32)

> nssm.exe install grafana

Go to Services and start grafana service for the first time manually.

You might also like