Density functional theory calculations are used to systematically investigate the structural and electronic properties of MX2 transition metal dichalcogenide monolayers with M = Cr, Mo, W and X = S, Se, Te that are doped with single (V, Nb, Ta) and double (Ti, Zr, Hf) acceptor dopants on the M site with local D3h symmetry in the dilute limit. Three impurity levels that arise from intervalley scattering are found above the valence band maxima (VBM): an orbitally doubly degenerate e' level bound to the K/K' VBM and a singly degenerate a'1 level bound to the P-point VBM. Replacing S with Se or Te lowers the I' point VBM substantially with respect to the K/K' VBM bringing the a'1 level down with it. The relative positions of the impurity levels that determine the different structural and electronic properties of the impurities in p-doped MX2 monolayers can thus be tuned by replacing S with Se or Te. Single acceptors introduce a magnetic moment of 1 mu B in all MX2 monolayers. Out-of-plane magnetic anisotropy energies as large as 10 meV/dopant atom are found thereby satisfying an essential condition for long-range ferromagnetic ordering in two dimensions. For double acceptors in MS2 monolayers, both holes occupy the high-lying a'1 level with opposite spins so there is no magnetic moment; in MSe2 and MTe2 monolayers the holes occupy the e' level, a Jahn-Teller (JT) distortion wins the competition with exchange splitting resulting in the quenching of the magnetic moments. Even when the JT distortion is disallowed, magnetic double acceptors have a large in-plane magnetic anisotropy energy that is incompatible with long-range magnetic ordering in two dimensions. The magnetic moments of pairs of single acceptors exhibit long-range ferromagnetic coupling except for MS2 where the coupling is quenched for impurity pairs below a critical separation. For Se and Te compounds, the holes are accommodated in high-lying degenerate e' levels, which form triplets for all separations. However, for X = Te, a JT distortion lifts the degeneracy of the e' levels leading to a reduction of the exchange interaction between impurity pairs. Deep, intrinsic, vacancy, and antisite defects that localize the holes might stabilize the magnetization of p-doped MX2 monolayers. Our systematic study of the p-doped MX2 monolayers identifies 1H CrTe2 and MoSe2 as the most promising candidates for room-temperature ferromagnetism. We combine the exchange interaction estimated from the energy difference calculated for ferromagnetically and antiferromagnetically coupled pairs with Monte Carlo calculations to estimate the Curie temperatures TC for vanadium-doped CrTe2 and MoSe2 monolayers. Room-temperature values of TC are predicted for V dopant concentrations of 5% and 9%, respectively. In view of the instability of CrTe2 in the 1H form, we suggest that the CrxMo1-x(TeySe1-y)2 alloy system be studied. A single d electron or hole is uncorrelated. However, in the single-impurity limit, the residual self-interaction of this carrier in the local spin density approximation (LSDA) can be corrected by introducing a Hubbard U. Doing so leads to a large increase of the ordering temperatures calculated in the LSDA (reducing the doping concentration needed to achieve room-temperature ordering) but at the expense of introducing an indeterminate parameter U.