Nagios监控IIS相关性能指标
使用WMI读取到单个站点的相关性能参数
https://github.com/dcl-lily/Other_Nagios_Check
具体脚本文件
通过WMI读取IIS相关的性能值Win32_PerfRawData_W3SVC_WebService
详细说明请产考:
https://msdn.microsoft.com/zh-cn/subscriptions/downloads/aa394298(v=vs.85).aspx
使用方法 :
cscript //Nologo 脚本名.vbs 站点名 对象名 警告阈值 严重阈值 比较方式
站点名和对象名必须指定,对象名称产考以上MSDN网站
警告、严重阈值,可以不指定,指定必须两个同时指定,而且必须为数值
比较方式 非必须,默认为gt 大于方式比较,还可以指定lt 小于方式比较
example:
cscript //nologo Check_WMI_IIS.vbs mail BytesTotalPersec
cscript //nologo Check_WMI_IIS.vbs mail TotalLockedErrors 5 10
cscript //nologo Check_WMI_IIS.vbs mail ServiceUptime 3600 2400 lt
@author: AlexDu
@version: 1.1
@copyright: IT经验.
@license: GPLv3
2017-11-20
具体可指定的对象有如下,还需要进行筛选操作,毕竟是通过WMI取值,取大量密集的参数,本来就有很大的性能消耗
AnonymousUsersPerSec
BytesReceivedPerSec
BytesSentPerSec
BytesTotalPerSec
Caption
CGIRequestsPerSec
ConnectionAttemptsPerSec
CopyRequestsPerSec
CurrentAnonymousUsers
CurrentBlockedAsyncIORequests
CurrentCGIRequests
CurrentConnections
CurrentISAPIExtensionRequests
CurrentNonAnonymousUsers
DeleteRequestsPerSec
Description
FilesPerSec
FilesReceivedPerSec
FilesSentPerSec
Frequency_Object
Frequency_PerfTime
Frequency_Sys100NS
GetRequestsPerSec
HeadRequestsPerSec
ISAPIExtensionRequestsPerSec
LockedErrorsPerSec
LockRequestsPerSec
LogonAttemptsPerSec
MaximumAnonymousUsers
MaximumCGIRequests
MaximumConnections
MaximumISAPIExtensionRequests
MaximumNonAnonymousUsers
MeasuredAsyncIOBandwidthUsage
MkcolRequestsPerSec
MoveRequestsPerSec
Name
NonAnonymousUsersPerSec
NotFoundErrorsPerSec
OptionsRequestsPerSec
OtherRequestMethodsPerSec
PostRequestsPerSec
PropfindRequestsPerSec
ProppatchRequestsPerSec
PutRequestsPerSec
SearchRequestsPerSec
ServiceUptime
Timestamp_Object
Timestamp_PerfTime
Timestamp_Sys100NS
TotalAllowedAsyncIORequests
TotalAnonymousUsers
TotalBlockedAsyncIORequests
TotalCGIRequests
TotalConnectionAttemptsAllInstances
TotalCopyRequests
TotalDeleteRequests
TotalFilesReceived
TotalFilesSent
TotalFilesTransferred
TotalGetRequests
TotalHeadRequests
TotalISAPIExtensionRequests
TotalLockedErrors
TotalLockRequests
TotalLogonAttempts
TotalMethodRequests
TotalMethodRequestsPerSec
TotalMkcolRequests
TotalMoveRequests
TotalNonAnonymousUsers
TotalNotFoundErrors
TotalOptionsRequests
TotalOtherRequestMethods
TotalPostRequests
TotalPropfindRequests
TotalProppatchRequests
TotalPutRequests
TotalRejectedAsyncIORequests
TotalSearchRequests
TotalTraceRequests
TotalUnlockRequests
TraceRequestsPerSec
UnlockRequestsPerSec
- 本文标签: 技术分享
- 本文链接: http://www.iamlk.cn/article/90
- 版权声明: 本文由Leonidax原创发布,转载请遵循《署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)》许可协议授权