@@ -290,6 +290,27 @@ impl<R: Read> Parser<R> {
290290 } )
291291 }
292292
293+ /// Parse Queue Length - Format (0,1003)
294+ pub ( super ) fn parse_queue_length (
295+ & mut self ,
296+ ) -> Result < crate :: models:: record_counters:: QueueLength > {
297+ Ok ( crate :: models:: record_counters:: QueueLength {
298+ queue_index : self . read_u32 ( ) ?,
299+ segment_size : self . read_u32 ( ) ?,
300+ queue_segments : self . read_u32 ( ) ?,
301+ queue_length_0 : self . read_u32 ( ) ?,
302+ queue_length_1 : self . read_u32 ( ) ?,
303+ queue_length_2 : self . read_u32 ( ) ?,
304+ queue_length_4 : self . read_u32 ( ) ?,
305+ queue_length_8 : self . read_u32 ( ) ?,
306+ queue_length_32 : self . read_u32 ( ) ?,
307+ queue_length_128 : self . read_u32 ( ) ?,
308+ queue_length_1024 : self . read_u32 ( ) ?,
309+ queue_length_more : self . read_u32 ( ) ?,
310+ dropped : self . read_u32 ( ) ?,
311+ } )
312+ }
313+
293314 /// Parse OpenFlow Port - Format (0,1004)
294315 pub ( super ) fn parse_openflow_port (
295316 & mut self ,
@@ -556,33 +577,6 @@ impl<R: Read> Parser<R> {
556577 } )
557578 }
558579
559- /// Parse Temperature - Format (0,3001)
560- pub ( super ) fn parse_temperature (
561- & mut self ,
562- ) -> Result < crate :: models:: record_counters:: Temperature > {
563- Ok ( crate :: models:: record_counters:: Temperature {
564- minimum : self . read_i32 ( ) ?,
565- maximum : self . read_i32 ( ) ?,
566- errors : self . read_u32 ( ) ?,
567- } )
568- }
569-
570- /// Parse Humidity - Format (0,3002)
571- pub ( super ) fn parse_humidity ( & mut self ) -> Result < crate :: models:: record_counters:: Humidity > {
572- Ok ( crate :: models:: record_counters:: Humidity {
573- relative : self . read_i32 ( ) ?,
574- } )
575- }
576-
577- /// Parse Fans - Format (0,3003)
578- pub ( super ) fn parse_fans ( & mut self ) -> Result < crate :: models:: record_counters:: Fans > {
579- Ok ( crate :: models:: record_counters:: Fans {
580- total : self . read_u32 ( ) ?,
581- failed : self . read_u32 ( ) ?,
582- speed : self . read_u32 ( ) ?,
583- } )
584- }
585-
586580 /// Parse Virtual Node - Format (0,2100)
587581 pub ( super ) fn parse_virtual_node (
588582 & mut self ,
@@ -839,6 +833,33 @@ impl<R: Read> Parser<R> {
839833 } )
840834 }
841835
836+ /// Parse Temperature - Format (0,3001)
837+ pub ( super ) fn parse_temperature (
838+ & mut self ,
839+ ) -> Result < crate :: models:: record_counters:: Temperature > {
840+ Ok ( crate :: models:: record_counters:: Temperature {
841+ minimum : self . read_i32 ( ) ?,
842+ maximum : self . read_i32 ( ) ?,
843+ errors : self . read_u32 ( ) ?,
844+ } )
845+ }
846+
847+ /// Parse Humidity - Format (0,3002)
848+ pub ( super ) fn parse_humidity ( & mut self ) -> Result < crate :: models:: record_counters:: Humidity > {
849+ Ok ( crate :: models:: record_counters:: Humidity {
850+ relative : self . read_i32 ( ) ?,
851+ } )
852+ }
853+
854+ /// Parse Fans - Format (0,3003)
855+ pub ( super ) fn parse_fans ( & mut self ) -> Result < crate :: models:: record_counters:: Fans > {
856+ Ok ( crate :: models:: record_counters:: Fans {
857+ total : self . read_u32 ( ) ?,
858+ failed : self . read_u32 ( ) ?,
859+ speed : self . read_u32 ( ) ?,
860+ } )
861+ }
862+
842863 /// Parse Broadcom Device Buffer Utilization - Format (4413,1)
843864 pub ( super ) fn parse_broadcom_device_buffers (
844865 & mut self ,
@@ -976,6 +997,7 @@ impl<R: Read> Parser<R> {
976997 1002 => Ok ( CounterData :: RadioUtilization (
977998 parser. parse_radio_utilization ( ) ?,
978999 ) ) ,
1000+ 1003 => Ok ( CounterData :: QueueLength ( parser. parse_queue_length ( ) ?) ) ,
9791001 1004 => Ok ( CounterData :: OpenFlowPort ( parser. parse_openflow_port ( ) ?) ) ,
9801002 1005 => Ok ( CounterData :: OpenFlowPortName (
9811003 parser. parse_openflow_port_name ( ) ?,
@@ -993,27 +1015,28 @@ impl<R: Read> Parser<R> {
9931015 2008 => Ok ( CounterData :: Mib2IcmpGroup ( parser. parse_mib2_icmp_group ( ) ?) ) ,
9941016 2009 => Ok ( CounterData :: Mib2TcpGroup ( parser. parse_mib2_tcp_group ( ) ?) ) ,
9951017 2010 => Ok ( CounterData :: Mib2UdpGroup ( parser. parse_mib2_udp_group ( ) ?) ) ,
996- 3000 => Ok ( CounterData :: Energy ( parser. parse_energy ( ) ?) ) ,
997- 3001 => Ok ( CounterData :: Temperature ( parser. parse_temperature ( ) ?) ) ,
998- 3002 => Ok ( CounterData :: Humidity ( parser. parse_humidity ( ) ?) ) ,
999- 3003 => Ok ( CounterData :: Fans ( parser. parse_fans ( ) ?) ) ,
10001018 2100 => Ok ( CounterData :: VirtualNode ( parser. parse_virtual_node ( ) ?) ) ,
10011019 2101 => Ok ( CounterData :: VirtualCpu ( parser. parse_virtual_cpu ( ) ?) ) ,
10021020 2102 => Ok ( CounterData :: VirtualMemory ( parser. parse_virtual_memory ( ) ?) ) ,
10031021 2103 => Ok ( CounterData :: VirtualDiskIo ( parser. parse_virtual_disk_io ( ) ?) ) ,
10041022 2104 => Ok ( CounterData :: VirtualNetIo ( parser. parse_virtual_net_io ( ) ?) ) ,
10051023 2105 => Ok ( CounterData :: JvmRuntime ( parser. parse_jvm_runtime ( ) ?) ) ,
10061024 2106 => Ok ( CounterData :: JvmStatistics ( parser. parse_jvm_statistics ( ) ?) ) ,
1025+ // DEPRECATED
10071026 2200 => Ok ( CounterData :: MemcacheCountersDeprecated (
10081027 parser. parse_memcache_counters_deprecated ( ) ?,
10091028 ) ) ,
10101029 2201 => Ok ( CounterData :: HttpCounters ( parser. parse_http_counters ( ) ?) ) ,
1030+ 2202 => Ok ( CounterData :: AppOperations ( parser. parse_app_operations ( ) ?) ) ,
1031+ 2203 => Ok ( CounterData :: AppResources ( parser. parse_app_resources ( ) ?) ) ,
10111032 2204 => Ok ( CounterData :: MemcacheCounters (
10121033 parser. parse_memcache_counters ( ) ?,
10131034 ) ) ,
1014- 2202 => Ok ( CounterData :: AppOperations ( parser. parse_app_operations ( ) ?) ) ,
1015- 2203 => Ok ( CounterData :: AppResources ( parser. parse_app_resources ( ) ?) ) ,
10161035 2206 => Ok ( CounterData :: AppWorkers ( parser. parse_app_workers ( ) ?) ) ,
1036+ 3000 => Ok ( CounterData :: Energy ( parser. parse_energy ( ) ?) ) ,
1037+ 3001 => Ok ( CounterData :: Temperature ( parser. parse_temperature ( ) ?) ) ,
1038+ 3002 => Ok ( CounterData :: Humidity ( parser. parse_humidity ( ) ?) ) ,
1039+ 3003 => Ok ( CounterData :: Fans ( parser. parse_fans ( ) ?) ) ,
10171040 _ => Ok ( CounterData :: Unknown { format, data } ) ,
10181041 }
10191042 } else if format. enterprise ( ) == 4413 {
0 commit comments