Investigation of the zero-field splitting and g-values of d8 ions in trigonal compounds CsMgX3:Ni2+ (X = Cl, Br, I)