1 #ifndef SQUID_CACHE_SNMP_H
2 #define SQUID_CACHE_SNMP_H
9 #define MIN(a,b) (a<b?a:b)
13 #include "snmp_impl.h"
18 * .iso.org.dod.internet.private.enterprises.nlanr.squid
22 * .iso.org.dod.internet.experimental.nsfnet.proxy
26 #define SQUIDMIB 1, 3, 6, 1, 4, 1, 3495, 1
27 #define LEN_SQUIDMIB 8
29 #define TIME_INDEX 1, 5, 60
30 #define TIME_INDEX_LEN 3
32 /* basic groups under .squid */
34 #define SQ_SYS SQUIDMIB, 1 /* cacheSystem group { squid 1 } */
35 #define LEN_SQ_SYS LEN_SQUIDMIB+1
36 #define SQ_CONF SQUIDMIB, 2 /* cacheConfig group { squid 2 } */
37 #define LEN_SQ_CONF LEN_SQUIDMIB+1
38 #define SQ_PRF SQUIDMIB, 3 /* cachePerformance group { squid 3 } */
39 #define LEN_SQ_PRF LEN_SQUIDMIB+1
40 #define SQ_NET SQUIDMIB, 4 /* cacheNetwork group { squid 4 } */
41 #define LEN_SQ_NET LEN_SQUIDMIB+1
42 #define SQ_MESH SQUIDMIB, 5 /* cacheMesh group { squid 5 } */
43 #define LEN_SQ_MESH LEN_SQUIDMIB+1
46 * cacheSystem group { squid 1 }
50 SYSVMSIZ
= 1, /**< cacheSysVMsize */
51 SYSSTOR
= 2, /**< cacheSysStorage */
52 SYS_UPTIME
= 3, /**< cacheUptime */
56 #define LEN_SYS LEN_SQ_SYS + 1
57 #define LEN_SYS_INST LEN_SQ_SYS + 2
60 * cacheConfig group { squid 2 }
64 CONF_ADMIN
= 1, /**< cacheAdmin */
65 CONF_VERSION
= 2, /**< cacheSoftware */
66 CONF_VERSION_ID
= 3, /**< cacheVersionId */
67 CONF_LOG_FAC
= 4, /**< cacheLoggingFacility */
68 CONF_STORAGE
= 5, /**< cacheStorageConfig group */
69 CONF_UNIQNAME
= 6, /**< cacheUniqName */
73 #define LEN_CONF LEN_SQ_CONF + 1
74 #define LEN_CONF_INST LEN_SQ_CONF + 2
77 * cacheStorageConfig group { cacheConfig 5 }
81 CONF_ST_MMAXSZ
= 1, /* cacheMemMaxSize */
82 CONF_ST_SWMAXSZ
= 2, /* cacheSwapMaxSize */
83 CONF_ST_SWHIWM
= 3, /* cacheSwapHighWM */
84 CONF_ST_SWLOWM
= 4, /* cacheSwapLowWM */
88 #define LEN_CONF_ST LEN_CONF + 1
89 #define LEN_CONF_ST_INST LEN_CONF + 2
92 * Cache Performance Group {squid 3}
97 PERF_SYS
= 1, /* cacheSysPerf */
98 PERF_PROTO
= 2, /* cacheProtoStats */
105 PERF_SYS_PF
= 1, /* cacheSysPageFaults */
106 PERF_SYS_NUMR
= 2, /* cacheSysNumReads */
107 PERF_SYS_MEMUSAGE
= 3, /* cacheMemUsage */
108 PERF_SYS_CPUTIME
= 4, /* cacheCpuTime */
109 PERF_SYS_CPUUSAGE
= 5, /* cacheCpuUsage */
110 PERF_SYS_MAXRESSZ
= 6, /* cacheMaxResSize */
111 PERF_SYS_NUMOBJCNT
= 7, /* cacheNumObjCount */
112 PERF_SYS_CURLRUEXP
= 8, /* cacheCurrentLRUExpiration */
113 PERF_SYS_CURUNLREQ
= 9, /* cacheCurrentUnlinkRequests */
114 PERF_SYS_CURUNUSED_FD
= 10, /* cacheCurrentUnusedFDescrCnt */
115 PERF_SYS_CURRESERVED_FD
= 11, /* cacheCurrentResFileDescrCnt */
116 PERF_SYS_CURUSED_FD
= 12, /* cacheCurrentFileDescrCnt */
117 PERF_SYS_CURMAX_FD
= 13, /* cacheCurrentFileDescrMax */
121 /* cacheProtoStats */
123 PERF_PROTOSTAT_START
,
124 PERF_PROTOSTAT_AGGR
= 1, /* cacheProtoAggregateStats */
125 PERF_PROTOSTAT_MEDIAN
= 2, /* cacheMedianSvcTable */
129 /* cacheProtoAggregateStats */
131 PERF_PROTOSTAT_AGGR_START
= 0,
132 PERF_PROTOSTAT_AGGR_HTTP_REQ
= 1, /* cacheProtoClientHttpRequests */
133 PERF_PROTOSTAT_AGGR_HTTP_HITS
= 2, /* cacheHttpHits */
134 PERF_PROTOSTAT_AGGR_HTTP_ERRORS
= 3, /* cacheHttpErrors */
135 PERF_PROTOSTAT_AGGR_HTTP_KBYTES_IN
= 4, /* cacheHttpInKb */
136 PERF_PROTOSTAT_AGGR_HTTP_KBYTES_OUT
= 5, /* cacheHttpOutKb */
137 PERF_PROTOSTAT_AGGR_ICP_S
= 6, /* cacheIcpPktsSent */
138 PERF_PROTOSTAT_AGGR_ICP_R
= 7, /* cacheIcpPktsRecv */
139 PERF_PROTOSTAT_AGGR_ICP_SKB
= 8, /* cacheIcpKbSent */
140 PERF_PROTOSTAT_AGGR_ICP_RKB
= 9, /* cacheIcpKbRecv */
141 PERF_PROTOSTAT_AGGR_REQ
= 10, /* cacheServerRequests */
142 PERF_PROTOSTAT_AGGR_ERRORS
= 11, /* cacheServerErrors */
143 PERF_PROTOSTAT_AGGR_KBYTES_IN
= 12, /* cacheServerInKb */
144 PERF_PROTOSTAT_AGGR_KBYTES_OUT
= 13, /* cacheServerOutKb */
145 PERF_PROTOSTAT_AGGR_CURSWAP
= 14, /* cacheCurrentSwapSize */
146 PERF_PROTOSTAT_AGGR_CLIENTS
= 15, /* cacheClients */
147 PERF_PROTOSTAT_AGGR_END
150 /* cacheMedianSvcEntry */
152 PERF_MEDIAN_START
= 0,
153 PERF_MEDIAN_TIME
= 1, /* cacheMedianTime */
154 PERF_MEDIAN_HTTP_ALL
= 2, /* cacheHttpAllSvcTime */
155 PERF_MEDIAN_HTTP_MISS
= 3, /* cacheHttpMissSvcTime */
156 PERF_MEDIAN_HTTP_NM
= 4, /* cacheHttpNmSvcTime */
157 PERF_MEDIAN_HTTP_HIT
= 5, /* cacheHttpHitSvcTime */
158 PERF_MEDIAN_ICP_QUERY
= 6, /* cacheIcpQuerySvcTime */
159 PERF_MEDIAN_ICP_REPLY
= 7, /* cacheIcpReplySvcTime */
160 PERF_MEDIAN_DNS
= 8, /* cacheDnsSvcTime */
161 PERF_MEDIAN_RHR
= 9, /* cacheRequestHitRatio */
162 PERF_MEDIAN_BHR
= 10, /* cacheRequestByteRatio */
163 PERF_MEDIAN_HTTP_NH
= 11, /* cacheHttpNhSvcTime */
168 * cacheNetwork group { squid 4 }
172 NET_IP_CACHE
= 1, /* cacheIpCache */
173 NET_FQDN_CACHE
= 2, /* cacheFqdnCache */
174 NET_DNS_CACHE
= 3, /* cacheDns */
181 IP_ENT
= 1, /* cacheIpEntrie */
182 IP_REQ
= 2, /* cacheIpRequests */
183 IP_HITS
= 3, /* acheIpHits */
184 IP_PENDHIT
= 4, /* cacheIpPendingHits */
185 IP_NEGHIT
= 5, /* cacheIpNegativeHit */
186 IP_MISS
= 6, /* cacheIpMisses */
187 IP_GHBN
= 7, /* cacheBlockingGetHostByName */
188 IP_LOC
= 8, /* cacheAttemptReleaseLckEntries */
195 FQDN_ENT
= 1, /* cacheFqdnEntries */
196 FQDN_REQ
= 2, /* cacheFqdnRequests */
197 FQDN_HITS
= 3, /* cacheFqdnHits */
198 FQDN_PENDHIT
= 4, /* cacheFqdnPendingHits */
199 FQDN_NEGHIT
= 5, /* cacheFqdnNegativeHits */
200 FQDN_MISS
= 6, /* cacheFqdnMisses */
201 FQDN_GHBN
= 7, /* cacheBlockingGetHostByAddr */
208 DNS_REQ
= 1, /* cacheDnsRequests */
209 DNS_REP
= 2, /* cacheDnsReplies */
210 DNS_SERVERS
= 3, /* cacheDnsNumberServers */
215 * cacheMesh group { squid 5 }
220 MESH_PTBL
= 1, /* cachePeerTable */
221 MESH_CTBL
= 2, /* cacheClientTable */
225 /* CachePeerTableEntry (version 3) */
228 MESH_PTBL_INDEX
= 1, /* cachePeerIndex */
229 MESH_PTBL_NAME
= 2, /* cachePeerName */
230 MESH_PTBL_ADDR_TYPE
= 3, /* cachePeerAddressType */
231 MESH_PTBL_ADDR
= 4, /* cachePeerAddress */
232 MESH_PTBL_HTTP
= 5, /* cachePortHttp */
233 MESH_PTBL_ICP
= 6, /* cachePeerPortIcp */
234 MESH_PTBL_TYPE
= 7, /* cachePeerType */
235 MESH_PTBL_STATE
= 8, /* cachePeerStat */
236 MESH_PTBL_SENT
= 9, /* cachePeerPingsSent */
237 MESH_PTBL_PACKED
= 10, /* cachePeerPingsAcked */
238 MESH_PTBL_FETCHES
= 11, /* cachePeerFetches */
239 MESH_PTBL_RTT
= 12, /* cachePeerRtt */
240 MESH_PTBL_IGN
= 13, /* cachePeerIgnored */
241 MESH_PTBL_KEEPAL_S
= 14, /* cachePeerKeepAlSent */
242 MESH_PTBL_KEEPAL_R
= 15, /* cachePeerKeepAlRecv */
246 /* cacheClientEntry */
249 MESH_CTBL_ADDR_TYPE
= 1, /* cacheClientAddressType */
250 MESH_CTBL_ADDR
= 2, /* cacheClientAddress */
251 MESH_CTBL_HTREQ
= 3, /* cacheClientHttpRequests */
252 MESH_CTBL_HTBYTES
= 4, /* cacheClientHttpKb */
253 MESH_CTBL_HTHITS
= 5, /* cacheClientHttpHits */
254 MESH_CTBL_HTHITBYTES
= 6, /* cacheClientHTTPHitKb */
255 MESH_CTBL_ICPREQ
= 7, /* cacheClientIcpRequests */
256 MESH_CTBL_ICPBYTES
= 8, /* cacheClientIcpKb */
257 MESH_CTBL_ICPHITS
= 9, /* cacheClientIcpHits */
258 MESH_CTBL_ICPHITBYTES
= 10, /* cacheClientIcpHitKb */
262 #endif /* SQUID_SNMP */
264 #endif /* SQUID_CACHE_SNMP_H */