资讯专栏INFORMATION COLUMN

k8s与监控--k8s部署grafana6.0

Jeffrrey / 3145人阅读

摘要:前言本文主要介绍最新版本的一些新特性和如何部署到当中。主要亮点是一个新的查询工作流,用于临时数据探索和故障排除。已经过测试版并正式发布。使更易于部署并提高安全性。下面是一张使用处理日志的截图部署我们主要提供将部署到中的方法。

前言

本文主要介绍最新版本grafana6.0的一些新特性和如何部署到k8s当中。

grafana6.0简介

Grafana的这一更新引入了一种新的查询展示数据的方式,支持日志数据和大量其他功能。

主要亮点是:

Explore - 一个新的查询工作流,用于临时数据探索和故障排除。

Grafana Loki - 与Grafana Labs的新开源日志聚合系统集成。

Gauge Panel - 种用于gauges的新型独立面板。

New Panel Editor UX 改进了面板编辑,并可在不同的可视化之间轻松切换。

Google Stackdriver Datasource 已经过测试版并正式发布。

Azure Monitor 插件从作为外部插件移植到核心数据源。

React Plugin 支持可以更轻松地构建插件。

Named Colors 包含在我们新的改良颜色选择器中。

Removal of user session storage 使Grafana更易于部署并提高安全性。

其实可以看出,Explore和Grafana Loki是专为用于grafana增强自己在日志展示方面而推出的future。不过 loki这个受prometheus启发而创建的日志存储和检索框架至今没有release,而且官方也不建议生产环境使用。但是loki是值得大家关注的一个技术,深度和k8s结合,可以用于专门处理k8s当中的日志。

下面是一张使用Explore处理日志的截图:

grafana6.0 部署

我们主要提供将grafana6.0 部署到k8s中的方法。

由于我们的环境是aws托管的k8s,所以需要注意pvc和svc这两个地方,需要大家移植的时候稍微做一下修改。

下面是configmap,主要包含了ldap.toml 和 grafana.ini 两个配置文件。由于企业实际环境中,需要对接单位的ldap,所以包含了ldap.toml

</>复制代码

  1. apiVersion: v1
  2. kind: ConfigMap
  3. metadata:
  4. labels:
  5. app: hawkeye-grafana
  6. name: hawkeye-grafana-cm
  7. namespace: sgt
  8. data:
  9. ldap.toml: |-
  10. # To troubleshoot and get more log info enable ldap debug logging in grafana.ini
  11. # [log]
  12. # filters = ldap:debug
  13. [[servers]]
  14. # Ldap server host (specify multiple hosts space separated)
  15. host = "ldap.xxx.org"
  16. # Default port is 389 or 636 if use_ssl = true
  17. port = 389
  18. # Set to true if ldap server supports TLS
  19. use_ssl = false
  20. # Set to true if connect ldap server with STARTTLS pattern (create connection in insecure, then upgrade to secure connection with TLS)
  21. start_tls = false
  22. # set to true if you want to skip ssl cert validation
  23. ssl_skip_verify = false
  24. # set to the path to your root CA certificate or leave unset to use system defaults
  25. # root_ca_cert = "/path/to/certificate.crt"
  26. # Authentication against LDAP servers requiring client certificates
  27. # client_cert = "/path/to/client.crt"
  28. # client_key = "/path/to/client.key"
  29. # Search user bind dn
  30. bind_dn = "cn=Manager,dc=xxx,dc=com"
  31. # Search user bind password
  32. # If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;"""
  33. bind_password = "xxxxx"
  34. # User search filter, for example "(cn=%s)" or "(sAMAccountName=%s)" or "(uid=%s)"
  35. search_filter = "(cn=%s)"
  36. # An array of base dns to search through
  37. search_base_dns = ["ou=tech,cn=hawkeye,dc=xxxx,dc=com"]
  38. ## For Posix or LDAP setups that does not support member_of attribute you can define the below settings
  39. ## Please check grafana LDAP docs for examples
  40. # group_search_filter = "(&(objectClass=posixGroup)(memberUid=%s))"
  41. # group_search_base_dns = ["ou=groups,dc=grafana,dc=org"]
  42. # group_search_filter_user_attribute = "uid"
  43. # Specify names of the ldap attributes your ldap uses
  44. [servers.attributes]
  45. name = "givenName"
  46. surname = "sn"
  47. username = "cn"
  48. member_of = "memberOf"
  49. email = "email"
  50. # Map ldap groups to grafana org roles
  51. [[servers.group_mappings]]
  52. group_dn = "cn=admins,dc=grafana,dc=org"
  53. org_role = "Admin"
  54. # To make user an instance admin (Grafana Admin) uncomment line below
  55. # grafana_admin = true
  56. # The Grafana organization database id, optional, if left out the default org (id 1) will be used
  57. # org_id = 1
  58. [[servers.group_mappings]]
  59. group_dn = "cn=users,dc=grafana,dc=org"
  60. org_role = "Editor"
  61. [[servers.group_mappings]]
  62. # If you want to match all (or no ldap groups) then you can use wildcard
  63. group_dn = "*"
  64. org_role = "Viewer"
  65. grafana.ini: |-
  66. ##################### Grafana Configuration Example #####################
  67. #
  68. # Everything has defaults so you only need to uncomment things you want to
  69. # change
  70. # possible values : production, development
  71. ;app_mode = production
  72. # instance name, defaults to HOSTNAME environment variable value or hostname if HOSTNAME var is empty
  73. ;instance_name = ${HOSTNAME}
  74. #################################### Paths ####################################
  75. [paths]
  76. # Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used)
  77. ;data = /var/lib/grafana
  78. # Temporary files in `data` directory older than given duration will be removed
  79. ;temp_data_lifetime = 24h
  80. # Directory where grafana can store logs
  81. ;logs = /var/log/grafana
  82. # Directory where grafana will automatically scan and look for plugins
  83. ;plugins = /var/lib/grafana/plugins
  84. # folder that contains provisioning config files that grafana will apply on startup and while running.
  85. ;provisioning = conf/provisioning
  86. #################################### Server ####################################
  87. [server]
  88. # Protocol (http, https, socket)
  89. ;protocol = http
  90. # The ip address to bind to, empty will bind to all interfaces
  91. ;http_addr =
  92. # The http port to use
  93. http_port = 3000
  94. # The public facing domain name used to access grafana from a browser
  95. ;domain = localhost
  96. # Redirect to correct domain if host header does not match domain
  97. # Prevents DNS rebinding attacks
  98. ;enforce_domain = false
  99. # The full public facing url you use in browser, used for redirects and emails
  100. # If you use reverse proxy and sub path specify full url (with sub path)
  101. ;root_url = http://localhost:3000
  102. # Log web requests
  103. ;router_logging = false
  104. # the path relative working path
  105. ;static_root_path = public
  106. # enable gzip
  107. ;enable_gzip = false
  108. # https certs & key file
  109. ;cert_file =
  110. ;cert_key =
  111. # Unix socket path
  112. ;socket =
  113. #################################### Database ####################################
  114. [database]
  115. # You can configure the database connection by specifying type, host, name, user and password
  116. # as separate properties or as on string using the url properties.
  117. # Either "mysql", "postgres" or "sqlite3", it"s your choice
  118. ;type = sqlite3
  119. ;host = 127.0.0.1:3306
  120. ;name = grafana
  121. ;user = root
  122. # If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;"""
  123. ;password =
  124. # Use either URL or the previous fields to configure the database
  125. # Example: mysql://user:secret@host:port/database
  126. ;url =
  127. # For "postgres" only, either "disable", "require" or "verify-full"
  128. ;ssl_mode = disable
  129. # For "sqlite3" only, path relative to data_path setting
  130. ;path = grafana.db
  131. # Max idle conn setting default is 2
  132. ;max_idle_conn = 2
  133. # Max conn setting default is 0 (mean not set)
  134. ;max_open_conn =
  135. # Connection Max Lifetime default is 14400 (means 14400 seconds or 4 hours)
  136. ;conn_max_lifetime = 14400
  137. # Set to true to log the sql calls and execution times.
  138. log_queries =
  139. #################################### Session ####################################
  140. [session]
  141. # Either "memory", "file", "redis", "mysql", "postgres", default is "file"
  142. ;provider = file
  143. # Provider config options
  144. # memory: not have any config yet
  145. # file: session dir path, is relative to grafana data_path
  146. # redis: config like redis server e.g. `addr=127.0.0.1:6379,pool_size=100,db=grafana`
  147. # mysql: go-sql-driver/mysql dsn config string, e.g. `user:password@tcp(127.0.0.1:3306)/database_name`
  148. # postgres: user=a password=b host=localhost port=5432 dbname=c sslmode=disable
  149. ;provider_config = sessions
  150. # Session cookie name
  151. ;cookie_name = grafana_sess
  152. # If you use session in https only, default is false
  153. ;cookie_secure = false
  154. # Session life time, default is 86400
  155. ;session_life_time = 86400
  156. #################################### Data proxy ###########################
  157. [dataproxy]
  158. # This enables data proxy logging, default is false
  159. ;logging = false
  160. #################################### Analytics ####################################
  161. [analytics]
  162. # Server reporting, sends usage counters to stats.grafana.org every 24 hours.
  163. # No ip addresses are being tracked, only simple counters to track
  164. # running instances, dashboard and error counts. It is very helpful to us.
  165. # Change this option to false to disable reporting.
  166. ;reporting_enabled = true
  167. # Set to false to disable all checks to https://grafana.net
  168. # for new vesions (grafana itself and plugins), check is used
  169. # in some UI views to notify that grafana or plugin update exists
  170. # This option does not cause any auto updates, nor send any information
  171. # only a GET request to http://grafana.com to get latest versions
  172. ;check_for_updates = true
  173. # Google Analytics universal tracking code, only enabled if you specify an id here
  174. ;google_analytics_ua_id =
  175. #################################### Security ####################################
  176. [security]
  177. # default admin user, created on startup
  178. ;admin_user = admin
  179. # default admin password, can be changed before first start of grafana, or in profile settings
  180. ;admin_password = admin
  181. # used for signing
  182. ;secret_key = xxxxx
  183. # Auto-login remember days
  184. ;login_remember_days = 7
  185. ;cookie_username = grafana_user
  186. ;cookie_remember_name = grafana_remember
  187. # disable gravatar profile images
  188. ;disable_gravatar = false
  189. # data source proxy whitelist (ip_or_domain:port separated by spaces)
  190. ;data_source_proxy_whitelist =
  191. # disable protection against brute force login attempts
  192. ;disable_brute_force_login_protection = false
  193. #################################### Snapshots ###########################
  194. [snapshots]
  195. # snapshot sharing options
  196. ;external_enabled = true
  197. ;external_snapshot_url = https://snapshots-origin.raintank.io
  198. ;external_snapshot_name = Publish to snapshot.raintank.io
  199. # remove expired snapshot
  200. ;snapshot_remove_expired = true
  201. #################################### Dashboards History ##################
  202. [dashboards]
  203. # Number dashboard versions to keep (per dashboard). Default: 20, Minimum: 1
  204. ;versions_to_keep = 20
  205. #################################### Users ###############################
  206. [users]
  207. # disable user signup / registration
  208. ;allow_sign_up = true
  209. # Allow non admin users to create organizations
  210. ;allow_org_create = true
  211. # Set to true to automatically assign new users to the default organization (id 1)
  212. ;auto_assign_org = true
  213. # Default role new users will be automatically assigned (if disabled above is set to true)
  214. ;auto_assign_org_role = Viewer
  215. # Background text for the user field on the login page
  216. ;login_hint = email or username
  217. # Default UI theme ("dark" or "light")
  218. ;default_theme = dark
  219. # External user management, these options affect the organization users view
  220. ;external_manage_link_url =
  221. ;external_manage_link_name =
  222. ;external_manage_info =
  223. # Viewers can edit/inspect dashboard settings in the browser. But not save the dashboard.
  224. ;viewers_can_edit = false
  225. [auth]
  226. # Set to true to disable (hide) the login form, useful if you use OAuth, defaults to false
  227. ;disable_login_form = false
  228. # Set to true to disable the signout link in the side menu. useful if you use auth.proxy, defaults to false
  229. ;disable_signout_menu = false
  230. # URL to redirect the user to after sign out
  231. ;signout_redirect_url =
  232. #################################### Anonymous Auth ##########################
  233. [auth.anonymous]
  234. # enable anonymous access
  235. ;enabled = false
  236. # specify organization name that should be used for unauthenticated users
  237. ;org_name = Main Org.
  238. # specify role for unauthenticated users
  239. ;org_role = Viewer
  240. #################################### Github Auth ##########################
  241. [auth.github]
  242. ;enabled = false
  243. ;allow_sign_up = true
  244. ;client_id = some_id
  245. ;client_secret = some_secret
  246. ;scopes = user:email,read:org
  247. ;auth_url = https://github.com/login/oauth/authorize
  248. ;token_url = https://github.com/login/oauth/access_token
  249. ;api_url = https://api.github.com/user
  250. ;team_ids =
  251. ;allowed_organizations =
  252. #################################### Google Auth ##########################
  253. [auth.google]
  254. ;enabled = false
  255. ;allow_sign_up = true
  256. ;client_id = some_client_id
  257. ;client_secret = some_client_secret
  258. ;scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
  259. ;auth_url = https://accounts.google.com/o/oauth2/auth
  260. ;token_url = https://accounts.google.com/o/oauth2/token
  261. ;api_url = https://www.googleapis.com/oauth2/v1/userinfo
  262. ;allowed_domains =
  263. #################################### Generic OAuth ##########################
  264. [auth.generic_oauth]
  265. ;enabled = false
  266. ;name = OAuth
  267. ;allow_sign_up = true
  268. ;client_id = some_id
  269. ;client_secret = some_secret
  270. ;scopes = user:email,read:org
  271. ;auth_url = https://foo.bar/login/oauth/authorize
  272. ;token_url = https://foo.bar/login/oauth/access_token
  273. ;api_url = https://foo.bar/user
  274. ;team_ids =
  275. ;allowed_organizations =
  276. ;tls_skip_verify_insecure = false
  277. ;tls_client_cert =
  278. ;tls_client_key =
  279. ;tls_client_ca =
  280. #################################### Grafana.com Auth ####################
  281. [auth.grafana_com]
  282. ;enabled = false
  283. ;allow_sign_up = true
  284. ;client_id = some_id
  285. ;client_secret = some_secret
  286. ;scopes = user:email
  287. ;allowed_organizations =
  288. #################################### Auth Proxy ##########################
  289. [auth.proxy]
  290. ;enabled = false
  291. ;header_name = X-WEBAUTH-USER
  292. ;header_property = username
  293. ;auto_sign_up = true
  294. ;ldap_sync_ttl = 60
  295. ;whitelist = 192.168.1.1, 192.168.2.1
  296. ;headers = Email:X-User-Email, Name:X-User-Name
  297. #################################### Basic Auth ##########################
  298. [auth.basic]
  299. ;enabled = true
  300. #################################### Auth LDAP ##########################
  301. [auth.ldap]
  302. enabled = true
  303. ;config_file = /etc/grafana/ldap.toml
  304. ;allow_sign_up = true
  305. #################################### SMTP / Emailing ##########################
  306. [smtp]
  307. enabled = true
  308. host = smtp.exmail.qq.com:465
  309. user = noreply@xxx.com
  310. # If the password contains # or ; you have to wrap it with trippel quotes. Ex """#password;"""
  311. password = AFxxxxxxYoQ2G
  312. from_address = noreply@xxxx.com
  313. from_name = Hawkeye
  314. ;cert_file =
  315. ;key_file =
  316. ;skip_verify = false
  317. ;from_address = admin@grafana.localhost
  318. ;from_name = Grafana
  319. # EHLO identity in SMTP dialog (defaults to instance_name)
  320. ;ehlo_identity = dashboard.example.com
  321. [emails]
  322. ;welcome_email_on_sign_up = false
  323. #################################### Logging ##########################
  324. [log]
  325. # Either "console", "file", "syslog". Default is console and file
  326. # Use space to separate multiple modes, e.g. "console file"
  327. ;mode = console file
  328. # Either "debug", "info", "warn", "error", "critical", default is "info"
  329. ;level = info
  330. # optional settings to set different levels for specific loggers. Ex filters = sqlstore:debug
  331. ;filters =
  332. # For "console" mode only
  333. [log.console]
  334. ;level =
  335. # log line format, valid options are text, console and json
  336. ;format = console
  337. # For "file" mode only
  338. [log.file]
  339. ;level =
  340. # log line format, valid options are text, console and json
  341. ;format = text
  342. # This enables automated log rotate(switch of following options), default is true
  343. ;log_rotate = true
  344. # Max line number of single file, default is 1000000
  345. ;max_lines = 1000000
  346. # Max size shift of single file, default is 28 means 1 << 28, 256MB
  347. ;max_size_shift = 28
  348. # Segment log daily, default is true
  349. ;daily_rotate = true
  350. # Expired days of log file(delete after max days), default is 7
  351. ;max_days = 7
  352. [log.syslog]
  353. ;level =
  354. # log line format, valid options are text, console and json
  355. ;format = text
  356. # Syslog network type and address. This can be udp, tcp, or unix. If left blank, the default unix endpoints will be used.
  357. ;network =
  358. ;address =
  359. # Syslog facility. user, daemon and local0 through local7 are valid.
  360. ;facility =
  361. # Syslog tag. By default, the process" argv[0] is used.
  362. ;tag =
  363. #################################### Alerting ############################
  364. [alerting]
  365. # Disable alerting engine & UI features
  366. ;enabled = true
  367. # Makes it possible to turn off alert rule execution but alerting UI is visible
  368. ;execute_alerts = true
  369. # Default setting for new alert rules. Defaults to categorize error and timeouts as alerting. (alerting, keep_state)
  370. ;error_or_timeout = alerting
  371. # Default setting for how Grafana handles nodata or null values in alerting. (alerting, no_data, keep_state, ok)
  372. ;nodata_or_nullvalues = no_data
  373. # Alert notifications can include images, but rendering many images at the same time can overload the server
  374. # This limit will protect the server from render overloading and make sure notifications are sent out quickly
  375. ;concurrent_render_limit = 5
  376. #################################### Explore #############################
  377. [explore]
  378. # Enable the Explore section
  379. ;enabled = false
  380. #################################### Internal Grafana Metrics ##########################
  381. # Metrics available at HTTP API Url /metrics
  382. [metrics]
  383. # Disable / Enable internal metrics
  384. ;enabled = true
  385. # Publish interval
  386. ;interval_seconds = 10
  387. # Send internal metrics to Graphite
  388. [metrics.graphite]
  389. # Enable by setting the address setting (ex localhost:2003)
  390. ;address =
  391. ;prefix = prod.grafana.%(instance_name)s.
  392. #################################### Distributed tracing ############
  393. [tracing.jaeger]
  394. # Enable by setting the address sending traces to jaeger (ex localhost:6831)
  395. ;address = localhost:6831
  396. # Tag that will always be included in when creating new spans. ex (tag1:value1,tag2:value2)
  397. ;always_included_tag = tag1:value1
  398. # Type specifies the type of the sampler: const, probabilistic, rateLimiting, or remote
  399. ;sampler_type = const
  400. # jaeger samplerconfig param
  401. # for "const" sampler, 0 or 1 for always false/true respectively
  402. # for "probabilistic" sampler, a probability between 0 and 1
  403. # for "rateLimiting" sampler, the number of spans per second
  404. # for "remote" sampler, param is the same as for "probabilistic"
  405. # and indicates the initial sampling rate before the actual one
  406. # is received from the mothership
  407. ;sampler_param = 1
  408. #################################### Grafana.com integration ##########################
  409. # Url used to import dashboards directly from Grafana.com
  410. [grafana_com]
  411. ;url = https://grafana.com
  412. #################################### External image storage ##########################
  413. [external_image_storage]
  414. # Used for uploading images to public servers so they can be included in slack/email messages.
  415. # you can choose between (s3, webdav, gcs, azure_blob, local)
  416. ;provider =
  417. [external_image_storage.s3]
  418. ;bucket =
  419. ;region =
  420. ;path =
  421. ;access_key =
  422. ;secret_key =
  423. [external_image_storage.webdav]
  424. ;url =
  425. ;public_url =
  426. ;username =
  427. ;password =
  428. [external_image_storage.gcs]
  429. ;key_file =
  430. ;bucket =
  431. ;path =
  432. [external_image_storage.azure_blob]
  433. ;account_name =
  434. ;account_key =
  435. ;container_name =
  436. [external_image_storage.local]
  437. # does not require any configuration
  438. [rendering]
  439. # Options to configure external image rendering server like https://github.com/grafana/grafana-image-renderer
  440. ;server_url =
  441. ;callback_url =
  442. ---

以上凡是我打 xxx都是经过修改的,隐藏了本司的一些重要信息。大家需要根据实际情况,自行配置修改。

。如果你不需要ldap 认证,
这可以删除configmap当中的 ldap.toml 并且在grafana.ini 当中 将true改为false。

</>复制代码

  1. #################################### Auth LDAP ##########################
  2. [auth.ldap]
  3. enabled = true
  4. ;config_file = /etc/grafana/ldap.toml
  5. ;allow_sign_up = true

deployment.yaml 如下:

</>复制代码

  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: hawkeye-grafana
  5. namespace: sgt
  6. labels:
  7. app: hawkeye-grafana
  8. spec:
  9. replicas: 1
  10. selector:
  11. matchLabels:
  12. app: hawkeye-grafana
  13. template:
  14. metadata:
  15. labels:
  16. app: hawkeye-grafana
  17. spec:
  18. containers:
  19. - image: grafana/grafana:6.0.0
  20. name: grafana
  21. imagePullPolicy: IfNotPresent
  22. # env:
  23. env:
  24. - name: GF_PATHS_PROVISIONING
  25. value: /var/lib/grafana/provisioning
  26. resources:
  27. # keep request = limit to keep this container in guaranteed class
  28. limits:
  29. cpu: 100m
  30. memory: 100Mi
  31. requests:
  32. cpu: 100m
  33. memory: 100Mi
  34. readinessProbe:
  35. httpGet:
  36. path: /login
  37. port: 3000
  38. # initialDelaySeconds: 30
  39. # timeoutSeconds: 1
  40. volumeMounts:
  41. - name: grafana-persistent-storage
  42. mountPath: /var/lib/grafana/
  43. - name: config
  44. mountPath: /etc/grafana/
  45. initContainers:
  46. - name: "init-chown-data"
  47. image: "busybox:latest"
  48. imagePullPolicy: "IfNotPresent"
  49. command: ["chown", "-R", "472:472", "/var/lib/grafana/"]
  50. volumeMounts:
  51. - name: grafana-persistent-storage
  52. mountPath: /var/lib/grafana/
  53. subPath: ""
  54. volumes:
  55. - name: config
  56. configMap:
  57. name: hawkeye-grafana-cm
  58. - name: grafana-persistent-storage
  59. persistentVolumeClaim:
  60. claimName: hawkeye-grafana-claim
  61. ---

注意增加了initContainers,主要是解决挂载的写权限的问题。

service.yaml 如下:

</>复制代码

  1. apiVersion: v1
  2. kind: Service
  3. metadata:
  4. annotations:
  5. service.beta.kubernetes.io/aws-load-balancer-type: nlb
  6. labels:
  7. app: hawkeye-grafana
  8. name: hawkeye-grafana
  9. namespace: sgt
  10. spec:
  11. type: LoadBalancer
  12. ports:
  13. - name: http
  14. port: 80
  15. protocol: TCP
  16. targetPort: 3000
  17. selector:
  18. app: hawkeye-grafana
  19. ---

pvc.yaml 如下:

</>复制代码

  1. kind: PersistentVolumeClaim
  2. apiVersion: v1
  3. metadata:
  4. name: hawkeye-grafana-claim
  5. namespace: sgt
  6. spec:
  7. accessModes:
  8. - ReadWriteOnce
  9. resources:
  10. requests:
  11. storage: 30Gi

执行成功以后,访问成功,通过admin/admin 登录。

可以看出,左侧新增了Explore图标。

总结

grafana 首先会从/usr/share/grafana/conf/defaults.ini读取配置文件,然后再读取/etc/grafana/grafana.ini读取,同一参数的配置,那么/etc/grafana/grafana.ini 会覆盖
/usr/share/grafana/conf/defaults.ini中配置。而命令行配置的参数会覆盖/etc/grafana/grafana.ini中的同一参数,最后环境变量中同一配置,又会覆盖命令行中的。

下面是默认的一些环境变量:

GF_PATHS_CONFIG /etc/grafana/grafana.ini
GF_PATHS_DATA /var/lib/grafana
GF_PATHS_HOME /usr/share/grafana
GF_PATHS_LOGS /var/log/grafana
GF_PATHS_PLUGINS /var/lib/grafana/plugins
GF_PATHS_PROVISIONING /etc/grafana/provisioning

文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。

转载请注明本文地址:https://www.ucloud.cn/yun/32902.html

相关文章

  • k8s监控--k8s部署grafana6.0

    摘要:前言本文主要介绍最新版本的一些新特性和如何部署到当中。主要亮点是一个新的查询工作流,用于临时数据探索和故障排除。已经过测试版并正式发布。使更易于部署并提高安全性。下面是一张使用处理日志的截图部署我们主要提供将部署到中的方法。 前言 本文主要介绍最新版本grafana6.0的一些新特性和如何部署到k8s当中。 grafana6.0简介 Grafana的这一更新引入了一种新的查询展示数据的...

    saucxs 评论0 收藏0
  • k8s监控--从kubernetes监控谈prometheus的federation机制

    摘要:也就是说整个监控系统不是部署在中。非的怎么监控是今天需要讨论的问题。官方给出的配置联邦机制也实现了的扩展。我们的集群外监控的方案就基于此。在同一个数据中心,每个监控其他的。上一级的监控数据中心级别的。 前言 有时候对于一个公司,k8s集群或是所谓的caas只是整个技术体系的一部分,往往这个时候监控系统不仅仅要k8s集群以及k8s中部署的应用,而且要监控传统部署的项目。也就是说整个监控系...

    wangym 评论0 收藏0
  • k8s监控--从kubernetes监控谈prometheus的federation机制

    摘要:也就是说整个监控系统不是部署在中。非的怎么监控是今天需要讨论的问题。官方给出的配置联邦机制也实现了的扩展。我们的集群外监控的方案就基于此。在同一个数据中心,每个监控其他的。上一级的监控数据中心级别的。 前言 有时候对于一个公司,k8s集群或是所谓的caas只是整个技术体系的一部分,往往这个时候监控系统不仅仅要k8s集群以及k8s中部署的应用,而且要监控传统部署的项目。也就是说整个监控系...

    curlyCheng 评论0 收藏0
  • 构建定制:唯品会 PaaS 基于 Kubernetes 的实践

    摘要:基于年底或年初没有推广的现状,唯品会部门目前已经做了两年的时间。唯品会现状唯品会目前线上有一千多个域,每个域之间相互的依赖比较复杂,每次的部署发布困难。这是唯品会的架构,主要包含持续集成和持续部署。 数人云上海&深圳两地容器之Mesos/K8S/Swarm三国演义的嘉宾精彩实录第三更来啦。唯品会是数人云Meetup的老朋友,去年曾做过RPC服务框架和Mesos容器化的分享。本次分享中,...

    JackJiang 评论0 收藏0
  • 拉勾网基于 UK8S平台的容器化改造实践

    摘要:宋体本文从拉勾网的业务架构日志采集监控服务暴露调用等方面介绍了其基于的容器化改造实践。宋体此外,拉勾网还有一套自研的环境的业务发布系统,不过这套发布系统未适配容器环境。写在前面 拉勾网于 2019 年 3 月份开始尝试将生产环境的业务从 UHost 迁移到 UK8S,截至 2019 年 9 月份,QA 环境的大部分业务模块已经完成容器化改造,生产环境中,后台管理服务已全部迁移到 UK8...

    CoorChice 评论0 收藏0

发表评论

0条评论

Jeffrrey

|高级讲师

TA的文章

阅读更多
最新活动
阅读需要支付1元查看
<