Acts as a sensor for nitrate/nitrite and transduces signal of nitrate availability to the NarL protein and of both nitrate/nitrite to the NarP protein. NarX probably activates NarL and NarP by phosphorylation in the presence of nitrate. NarX also plays a negative role in controlling NarL activity, probably through dephosphorylation in the absence of nitrate (By similarity). ATP + protein L-histidine = ADP + protein N-phospho-L-histidine.