分类: 云计算

阿里云如何通过函数计算和云监控服务监控消息服务MNS的消费堆积情况

阿里云消息服务MNS并没有自带堆积预警配置,如果消费有问题就会发生生产故障。通过函数计算做一个定时执行函数发送队列状态到云监控,再通过云监控配置预警即可。 函数实现明细build.gradle123456789101112dependencies { compile group: 'com.aliyun.mns', name: 'aliyun-sdk-mns

Nginx日志接入阿里云日志服务

配置Nginx 1vim /etc/nginx/nginx.conf Nginx新增一个日志格式 123log_format timed_combined '$remote_addr - $remote_user [$time_local] "$request" $http_host ' '$status $request_length $body_bytes_sent "$http_referer" ' '"$http_user_agent" $request_time $upstream_response_time "$sent_http_content_type"'; 设置日志输出路径 1access_log /var/log/nginx/aliyun.log timed_combined; 重新加载Nginx 1nginx -s reload