In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Environmental preparation
First, install grafana
Create the installation directory as you are used to, and this article is in the current directory
# cd # wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.3.2.linux-x64.tar.gz-- no-check-certificate # tar xzvf grafana-4.3.2.linux-x64.tar.gz # cd grafana-4.3.2/conf/ # vim defaults.ini Major changes to the database where the configuration database information is consistent with the Asura system database information
[database]
Type = mysql
Host =
Name =
User =
Password =
Url = mysql://monitor:aZkl299feM@os.dbm.com:3306/cmdb
Asura configuration information is available in
# cat / home/runtime/tomcat_8081/webapps/ROOT/WEB-INF/classes/jdbc.properties
Please pay attention to the information.
Jdbc.mysql.monitor.url.master=jdbc:mysql://os.dbm.com:3306/cmdb?useUnicode=true&characterEncoding=UTF-8
Jdbc.mysql.monitor.username.master=monitor
Jdbc.mysql.monitor.password.master=aZkl299feM
Start grafana
When cd grafana-4.3.2/bin/# starts in this way, the foreground starts, and the process is gone after the terminal shuts down. / grafana-server # you can use nohup to run nohup. / grafana-server & in the background
Then the installation of grafana is complete.
Visit grafana
Http:// your server address: 3000 will be able to access grafana
Like http://10.10.10.10:3000.
The default username and password are all admin
Configure Asura to access the url of grafana
Modify the Asura configuration file or add environment variables
Modify Asura configuration file
Vim / home/runtime/tomcat_8081/webapps/ROOT/WEB-INF/classes/system.properties
Add the following configuration to the file to save and restart the Asura tomcat service
GrafanaServer= http://10.16.35.193:3000/
# write the following configuration to / etc/profile using environment variable access
Export grafanaServer= http://10.16.35.193:3000/
Source / etc/profile
# restart the Asura tomcat service
Query data supported by Asura
Query condition support is used when making templates
Query Options
Query:
1. Multi-conditional query
The operation and maintenance group is used to query the business line. The ip address is 10.16.35.*, and the hostname contains the machine of os_.
[{"groups": "Application Operations Group"}, {"ip": "10.16.35?"}, {"hostname": "os_"}]
2. Specify an IP address
{"ip": "10.16.35.100"}
3. Check the value at the beginning of an IP address
{"ip": "10.16.35?"}
{"ip": "10.16.35.1?"}
{"ip": "10.16.?"}
4. Check the line of business
{"groups": "Application Operation and maintenance Group"}
5. Check the hostname of
{"hostname": "os_"}
Query syntax for metric
Indicator group | in the metric name, $host, (data acquisition type)
Example:
Loadavg | system.load.1,10.16.35.100 queried 10.16.35.100 metric data named system.load.1
In the grafana configuration template, add the host variable
Loadavg | system.load.1,$host then you can use variables to pass the ip address
Query the most recent piece of data
Loadavg | system.load.1,$host,last returns the result of the most recent metric in system.load.1
Loadavg | system.load.1,$host,max returns the maximum value within the specified query period
Loadavg | system.load.1,$host,min returns the minimum value within the specified query period
Loadavg | system.load.1,$host,count returns the number of data entries within the specified time period
Loadavg | system.load.1,$host,sum returns the summation result of the data within the specified time period
Loadavg | system.load.1,$host,avg returns the aPCge result of the data within a specified time period
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.