Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Grafan session data can't store mysql

Grafan session data can't store mysql

New Contributor

hi,everyone:

My Granfan Monitor orgion data want to store mysql ,i config /usr/lib/ambari-metrics-grafana/conf/default.ini ,but i cant find data

in mysql database. I want to know where step is error. my config steps is:

  • create 'session' table in mysql
    • CREATE TABLE `session` ( `key` CHAR(16) NOT NULL, `data` BLOB, `expiry` INT(11) UNSIGNED NOT NULL, PRIMARY KEY (`key`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  • config default.ini --I don't konw is right ?
    • [session]provider= mysql:root:admin@tcp(127.0.0.1:3306)/grafana
    • provider_config = sessions
    • cookie_name = grafana_sess
    • cookie_secure = false
    • session_life_time = 86400
    • gc_interval_time = 86400
  • I restart Metrics Monitor and Grafana service but i cant find data in mysql database

Who can help me ? thanks!

3 REPLIES 3

Re: Grafan session data can't store mysql

Super Guru
@pan bocun

in your default.ini you should have

provider = mysql

provider_config = root:admin@tcp(127.0.0.1:3306)/grafana

(here user is root and its password is admin. mysl is running on port 3306 and database you are connecting to is grafana which has your session table). Rest looks fine. Try it with this and see this link for help.

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

Highlighted

Re: Grafan session data can't store mysql

New Contributor

thanks! I change my config. session table have data

but i cant find Monitor orgion data in my sql database , eg: cpu data io、memory data

why?

Re: Grafan session data can't store mysql

New Contributor

thanks! I change my config. session table have data

but i cant find Monitor orgion data in my sql database , eg: cpu data io、memory data

why?