| | | ``pkt4-nak-sent`` should be close |
| | | to ``pkt4-request-received``. |
+----------------------------------------------------+----------------+------------------------------------+
+ | pkt4-service-disabled | integer | Number of incoming packets that |
+ | | | were dropped when the DHCP service |
+ | | | was disabled. |
+ +----------------------------------------------------+----------------+------------------------------------+
| pkt4-parse-failed | integer | Number of incoming packets that |
| | | could not be parsed. A non-zero |
| | | value of this statistic indicates |
| | | counter is increased by 1. |
+----------------------------------------------------+----------------+------------------------------------+
+Dropped incoming packets can be counted in the ``pkt4-receive-drop`` and
+a second counter detailing the drop cause:
+- ``pkt4-service-disabled`` - DHCP service is disabled
+- ``pkt4-parse-failed`` - packet parsing raised a fatal error
+
.. note::
The pool ID can be configured on each pool by explicitly setting the ``pool-id``
| | | server's server ID, or the packet |
| | | is malformed. |
+---------------------------------------------------+----------------+------------------------------------+
+ | pkt6-service-disabled | integer | Number of incoming packets that |
+ | | | were dropped when the DHCP service |
+ | | | was disabled. |
+ +---------------------------------------------------+----------------+------------------------------------+
| pkt6-parse-failed | integer | Number of incoming packets that |
| | | could not be parsed. A non-zero |
| | | value of this statistic indicates |
| | | reconfiguration event. |
+---------------------------------------------------+----------------+------------------------------------+
+Dropped incoming packets can be counted in the ``pkt6-receive-drop`` and
+a second counter detailing the drop cause:
+- ``pkt6-service-disabled`` - DHCP service is disabled
+- ``pkt6-parse-failed`` - packet parsing raised a fatal error
+
.. note::
The pool ID can be configured on each pool by explicitly setting the ``pool-id``
"2023-06-13 20:42:46.616348"
]
],
+ "pkt4-service-disabled": [
+ [
+ 0,
+ "2023-06-13 20:42:46.616351"
+ ]
+ ],
"pkt4-unknown-received": [
[
0,
"2023-06-13 21:28:57.177747"
]
],
+ "pkt6-service-disabled": [
+ [
+ 0,
+ "2023-06-13 21:28:57.177747"
+ ]
+ ],
"pkt6-solicit-received": [
[
0,
"2023-06-13 20:42:46.616348"
]
],
+ "pkt4-service-disabled": [
+ [
+ 0,
+ "2023-06-13 20:42:46.616351"
+ ]
+ ],
"pkt4-unknown-received": [
[
0,
"2023-06-13 21:28:57.177747"
]
],
+ "pkt6-service-disabled": [
+ [
+ 0,
+ "2023-06-13 21:28:57.177747"
+ ]
+ ],
"pkt6-solicit-received": [
[
0,
"pkt4-offer-sent",
"pkt4-ack-sent",
"pkt4-nak-sent",
+ "pkt4-service-disabled",
"pkt4-parse-failed",
"pkt4-receive-drop",
"v4-allocation-fail",
if (!network_state_->isServiceEnabled()) {
LOG_DEBUG(bad_packet4_logger, DBGLVL_PKT_HANDLING, DHCP4_PACKET_DROP_0008)
.arg(query->getLabel());
+ // Increase the statistics of service disabled and dropped packets.
+ isc::stats::StatsMgr::instance().addValue("pkt4-service-disabled",
+ static_cast<int64_t>(1));
+ isc::stats::StatsMgr::instance().addValue("pkt4-receive-drop",
+ static_cast<int64_t>(1));
return;
} else {
if (MultiThreadingMgr::instance().getMode()) {
"pkt4-offer-sent",
"pkt4-ack-sent",
"pkt4-nak-sent",
+ "pkt4-service-disabled",
"pkt4-parse-failed",
"pkt4-receive-drop",
"v4-allocation-fail",
"pkt4-offer-sent",
"pkt4-ack-sent",
"pkt4-nak-sent",
+ "pkt4-service-disabled",
"pkt4-parse-failed",
"pkt4-receive-drop",
"v4-allocation-fail",
"pkt6-reply-sent",
"pkt6-dhcpv4-response-sent",
"pkt6-addr-reg-reply-sent",
+ "pkt6-service-disabled",
"pkt6-parse-failed",
"pkt6-receive-drop",
"v6-allocation-fail",
if (!network_state_->isServiceEnabled()) {
LOG_DEBUG(bad_packet6_logger, DBGLVL_PKT_HANDLING, DHCP6_PACKET_DROP_DHCP_DISABLED)
.arg(query->getLabel());
+ // Increase the statistics of service disabled and dropped packets.
+ StatsMgr::instance().addValue("pkt6-service-disabled",
+ static_cast<int64_t>(1));
+ StatsMgr::instance().addValue("pkt6-receive-drop",
+ static_cast<int64_t>(1));
return;
} else {
if (MultiThreadingMgr::instance().getMode()) {
"pkt6-reply-sent",
"pkt6-dhcpv4-response-sent",
"pkt6-addr-reg-reply-sent",
+ "pkt6-service-disabled",
"pkt6-parse-failed",
"pkt6-receive-drop",
"v6-allocation-fail",
testReceiveStats(DHCPV6_ADDR_REG_INFORM, "pkt6-addr-reg-inform-received");
}
-// Test checks if reception of a malformed packet increases pkt-parse-failed
+// Test checks if reception of a malformed packet increases pkt6-parse-failed
// and pkt6-receive-drop
TEST_F(Dhcpv6SrvTest, receiveParseFailedStat) {
using namespace isc::stats;
"pkt6-reply-sent",
"pkt6-dhcpv4-response-sent",
"pkt6-addr-reg-reply-sent",
+ "pkt6-service-disabled",
"pkt6-parse-failed",
"pkt6-receive-drop",
"v6-allocation-fail",