1.PV, what is UV?
UV: Independent visitors, each independent internet computer as a visitor, the number of visitors to the site within one day
PV: Traffic, page views or clicks, users record once per visit
2. Statistics PV and UV according to Nginx's access log
UV based on access to IP to get back
awk ' {print '} ' Access.log | Sort | uniq-c | Wc-l
PV is counted according to the URL visited
awk ' {print $7} ' access.log|wc-l
3. Get PV and Uvs in shell scripts
vim/etc/zabbix/shell/monitor_website.sh
#!/bin/bash#uvuv () {awk ' {print $} ' access.log | sort | uniq-c | wc-l} #PVPV () {awk ' {print $7} ' ACCESS.LOG|WC- L}$1
4. Adding an agent template
Vim userparameter_my.conf
Userparameter=monitor_website[*],/bin/bash/etc/zabbix/shell/monitor_website.sh "$"
Parameter explanation:
Monitor_website[*]: is a custom key,* is a parameter is passed from the server side of the custom key value.
* in the web-side key value is MONITOR_TCP[PV], call the agent-side PV function
ready to update a topic on Zabbix monitoring, Welcome to join our Linux Technology Exchange Group: 642921645,zabbix Monitoring Exchange Group: 832462735, we do not regularly update a lot of information about the system operations in the group, look forward to your joining!
Zabbix PV and UV of the monitoring website for enterprise level monitoring