4 #ifndef SQUID_CACHE_SNMP_H
5 #define SQUID_CACHE_SNMP_H
16 #define MIN(a,b) (a<b?a:b)
20 #include "snmp_impl.h"
26 #include "snmp_vars.h"
30 * .iso.org.dod.internet.private.enterprises.nlanr.squid
34 * .iso.org.dod.internet.experimental.nsfnet.proxy
38 #define SQUIDMIB 1, 3, 6, 1, 4, 1, 3495, 1
39 #define LEN_SQUIDMIB 8
41 #define TIME_INDEX 1, 5, 60
42 #define TIME_INDEX_LEN 3
44 /* basic groups under .squid */
46 #define SQ_SYS SQUIDMIB, 1 /* cacheSystem group { squid 1 } */
47 #define LEN_SQ_SYS LEN_SQUIDMIB+1
48 #define SQ_CONF SQUIDMIB, 2 /* cacheConfig group { squid 2 } */
49 #define LEN_SQ_CONF LEN_SQUIDMIB+1
50 #define SQ_PRF SQUIDMIB, 3 /* cachePerformance group { squid 3 } */
51 #define LEN_SQ_PRF LEN_SQUIDMIB+1
52 #define SQ_NET SQUIDMIB, 4 /* cacheNetwork group { squid 4 } */
53 #define LEN_SQ_NET LEN_SQUIDMIB+1
54 #define SQ_MESH SQUIDMIB, 5 /* cacheMesh group { squid 5 } */
55 #define LEN_SQ_MESH LEN_SQUIDMIB+1
58 * cacheSystem group { squid 1 }
62 SYSVMSIZ
= 1, /**< cacheSysVMsize */
63 SYSSTOR
= 2, /**< cacheSysStorage */
64 SYS_UPTIME
= 3, /**< cacheUptime */
68 #define LEN_SYS LEN_SQ_SYS + 1
69 #define LEN_SYS_INST LEN_SQ_SYS + 2
72 * cacheConfig group { squid 2 }
76 CONF_ADMIN
= 1, /**< cacheAdmin */
77 CONF_VERSION
= 2, /**< cacheSoftware */
78 CONF_VERSION_ID
= 3, /**< cacheVersionId */
79 CONF_LOG_FAC
= 4, /**< cacheLoggingFacility */
80 CONF_STORAGE
= 5, /**< cacheStorageConfig group */
81 CONF_UNIQNAME
= 6, /**< cacheUniqName */
85 #define LEN_CONF LEN_SQ_CONF + 1
86 #define LEN_CONF_INST LEN_SQ_CONF + 2
90 * cacheStorageConfig group { cacheConfig 5 }
94 CONF_ST_MMAXSZ
= 1, /* cacheMemMaxSize */
95 CONF_ST_SWMAXSZ
= 2, /* cacheSwapMaxSize */
96 CONF_ST_SWHIWM
= 3, /* cacheSwapHighWM */
97 CONF_ST_SWLOWM
= 4, /* cacheSwapLowWM */
101 #define LEN_CONF_ST LEN_CONF + 1
102 #define LEN_CONF_ST_INST LEN_CONF + 2
105 * Cache Performance Group {squid 3}
110 PERF_SYS
= 1, /* cacheSysPerf */
111 PERF_PROTO
= 2, /* cacheProtoStats */
119 PERF_SYS_PF
= 1, /* cacheSysPageFaults */
120 PERF_SYS_NUMR
= 2, /* cacheSysNumReads */
121 PERF_SYS_MEMUSAGE
= 3, /* cacheMemUsage */
122 PERF_SYS_CPUTIME
= 4, /* cacheCpuTime */
123 PERF_SYS_CPUUSAGE
= 5, /* cacheCpuUsage */
124 PERF_SYS_MAXRESSZ
= 6, /* cacheMaxResSize */
125 PERF_SYS_NUMOBJCNT
= 7, /* cacheNumObjCount */
126 PERF_SYS_CURLRUEXP
= 8, /* cacheCurrentLRUExpiration */
127 PERF_SYS_CURUNLREQ
= 9, /* cacheCurrentUnlinkRequests */
128 PERF_SYS_CURUNUSED_FD
= 10, /* cacheCurrentUnusedFDescrCnt */
129 PERF_SYS_CURRESERVED_FD
= 11, /* cacheCurrentResFileDescrCnt */
130 PERF_SYS_CURUSED_FD
= 12, /* cacheCurrentFileDescrCnt */
131 PERF_SYS_CURMAX_FD
= 13, /* cacheCurrentFileDescrMax */
135 /* cacheProtoStats */
137 PERF_PROTOSTAT_START
,
138 PERF_PROTOSTAT_AGGR
= 1, /* cacheProtoAggregateStats */
139 PERF_PROTOSTAT_MEDIAN
= 2, /* cacheMedianSvcTable */
143 /* cacheProtoAggregateStats */
145 PERF_PROTOSTAT_AGGR_START
= 0,
146 PERF_PROTOSTAT_AGGR_HTTP_REQ
= 1, /* cacheProtoClientHttpRequests */
147 PERF_PROTOSTAT_AGGR_HTTP_HITS
= 2, /* cacheHttpHits */
148 PERF_PROTOSTAT_AGGR_HTTP_ERRORS
= 3, /* cacheHttpErrors */
149 PERF_PROTOSTAT_AGGR_HTTP_KBYTES_IN
= 4, /* cacheHttpInKb */
150 PERF_PROTOSTAT_AGGR_HTTP_KBYTES_OUT
= 5, /* cacheHttpOutKb */
151 PERF_PROTOSTAT_AGGR_ICP_S
= 6, /* cacheIcpPktsSent */
152 PERF_PROTOSTAT_AGGR_ICP_R
= 7, /* cacheIcpPktsRecv */
153 PERF_PROTOSTAT_AGGR_ICP_SKB
= 8, /* cacheIcpKbSent */
154 PERF_PROTOSTAT_AGGR_ICP_RKB
= 9, /* cacheIcpKbRecv */
155 PERF_PROTOSTAT_AGGR_REQ
= 10, /* cacheServerRequests */
156 PERF_PROTOSTAT_AGGR_ERRORS
= 11, /* cacheServerErrors */
157 PERF_PROTOSTAT_AGGR_KBYTES_IN
= 12, /* cacheServerInKb */
158 PERF_PROTOSTAT_AGGR_KBYTES_OUT
= 13, /* cacheServerOutKb */
159 PERF_PROTOSTAT_AGGR_CURSWAP
= 14, /* cacheCurrentSwapSize */
160 PERF_PROTOSTAT_AGGR_CLIENTS
= 15, /* cacheClients */
161 PERF_PROTOSTAT_AGGR_END
164 /* cacheMedianSvcEntry */
166 PERF_MEDIAN_START
= 0,
167 PERF_MEDIAN_TIME
= 1, /* cacheMedianTime */
168 PERF_MEDIAN_HTTP_ALL
= 2, /* cacheHttpAllSvcTime */
169 PERF_MEDIAN_HTTP_MISS
= 3, /* cacheHttpMissSvcTime */
170 PERF_MEDIAN_HTTP_NM
= 4, /* cacheHttpNmSvcTime */
171 PERF_MEDIAN_HTTP_HIT
= 5, /* cacheHttpHitSvcTime */
172 PERF_MEDIAN_ICP_QUERY
= 6, /* cacheIcpQuerySvcTime */
173 PERF_MEDIAN_ICP_REPLY
= 7, /* cacheIcpReplySvcTime */
174 PERF_MEDIAN_DNS
= 8, /* cacheDnsSvcTime */
175 PERF_MEDIAN_RHR
= 9, /* cacheRequestHitRatio */
176 PERF_MEDIAN_BHR
= 10, /* cacheRequestByteRatio */
177 PERF_MEDIAN_HTTP_NH
= 11, /* cacheHttpNhSvcTime */
182 * cacheNetwork group { squid 4 }
186 NET_IP_CACHE
= 1, /* cacheIpCache */
187 NET_FQDN_CACHE
= 2, /* cacheFqdnCache */
188 NET_DNS_CACHE
= 3, /* cacheDns */
195 IP_ENT
= 1, /* cacheIpEntrie */
196 IP_REQ
= 2, /* cacheIpRequests */
197 IP_HITS
= 3, /* acheIpHits */
198 IP_PENDHIT
= 4, /* cacheIpPendingHits */
199 IP_NEGHIT
= 5, /* cacheIpNegativeHit */
200 IP_MISS
= 6, /* cacheIpMisses */
201 IP_GHBN
= 7, /* cacheBlockingGetHostByName */
202 IP_LOC
= 8, /* cacheAttemptReleaseLckEntries */
209 FQDN_ENT
= 1, /* cacheFqdnEntries */
210 FQDN_REQ
= 2, /* cacheFqdnRequests */
211 FQDN_HITS
= 3, /* cacheFqdnHits */
212 FQDN_PENDHIT
= 4, /* cacheFqdnPendingHits */
213 FQDN_NEGHIT
= 5, /* cacheFqdnNegativeHits */
214 FQDN_MISS
= 6, /* cacheFqdnMisses */
215 FQDN_GHBN
= 7, /* cacheBlockingGetHostByAddr */
222 DNS_REQ
= 1, /* cacheDnsRequests */
223 DNS_REP
= 2, /* cacheDnsReplies */
224 DNS_SERVERS
= 3, /* cacheDnsNumberServers */
229 * cacheMesh group { squid 5 }
234 MESH_PTBL
= 1, /* cachePeerTable */
235 MESH_CTBL
= 2, /* cacheClientTable */
239 /* CachePeerTableEntry (version 3) */
242 MESH_PTBL_INDEX
= 1, /* cachePeerIndex */
243 MESH_PTBL_NAME
= 2, /* cachePeerName */
244 MESH_PTBL_ADDR_TYPE
= 3, /* cachePeerAddressType */
245 MESH_PTBL_ADDR
= 4, /* cachePeerAddress */
246 MESH_PTBL_HTTP
= 5, /* cachePortHttp */
247 MESH_PTBL_ICP
= 6, /* cachePeerPortIcp */
248 MESH_PTBL_TYPE
= 7, /* cachePeerType */
249 MESH_PTBL_STATE
= 8, /* cachePeerStat */
250 MESH_PTBL_SENT
= 9, /* cachePeerPingsSent */
251 MESH_PTBL_PACKED
= 10, /* cachePeerPingsAcked */
252 MESH_PTBL_FETCHES
= 11, /* cachePeerFetches */
253 MESH_PTBL_RTT
= 12, /* cachePeerRtt */
254 MESH_PTBL_IGN
= 13, /* cachePeerIgnored */
255 MESH_PTBL_KEEPAL_S
= 14, /* cachePeerKeepAlSent */
256 MESH_PTBL_KEEPAL_R
= 15, /* cachePeerKeepAlRecv */
260 /* cacheClientEntry */
263 MESH_CTBL_ADDR_TYPE
= 1, /* cacheClientAddressType */
264 MESH_CTBL_ADDR
= 2, /* cacheClientAddress */
265 MESH_CTBL_HTREQ
= 3, /* cacheClientHttpRequests */
266 MESH_CTBL_HTBYTES
= 4, /* cacheClientHttpKb */
267 MESH_CTBL_HTHITS
= 5, /* cacheClientHttpHits */
268 MESH_CTBL_HTHITBYTES
= 6, /* cacheClientHTTPHitKb */
269 MESH_CTBL_ICPREQ
= 7, /* cacheClientIcpRequests */
270 MESH_CTBL_ICPBYTES
= 8, /* cacheClientIcpKb */
271 MESH_CTBL_ICPHITS
= 9, /* cacheClientIcpHits */
272 MESH_CTBL_ICPHITBYTES
= 10, /* cacheClientIcpHitKb */
276 #endif /* SQUID_SNMP */
278 #endif /* SQUID_CACHE_SNMP_H */