This paper proposes a joint optimization mechanism for packet length and power in the scenario of covert short packet D2D communication, so as to effectively improve the communication performance between D2D pairs subject to the covert constraint. Specifically, we construct a short-packet D2D communication model assisted by covert communication, and further propose the notion of effective covert throughput (ECT) to quantitatively characterize the trade-off between the covertness and reliability of IoT state monitoring information transmission. Secondly, in the constructed communication scenario, we analyze the detection error probability of the warden and clarify that the existing equal power transmission of pilot and data signals can minimize the detection performance of the warden. However, this strategy is achieved by compromising the transmission performance of the system, which means that the ECT of D2D pair may not be optimal. Thirdly, we aim to maximize the ECT of D2D pair and construct a joint optimization problem for pilot transmission power, data transmission power, and packet length. Furthermore, a joint optimization algorithm based on the 2D search is adopted to obtain the optimal solution of the established optimization problem. Simulation results demonstrated that the transmission performance of the joint optimization algorithm is better than that of the scheme of the equal power scheme on the premise of ensuring the covertness.