A diode into 2 resistors to reduce the voltage from 170 V peak to whatever the range of your chip. 3.3v? 5v?
then a capacitor to hold the peak value for most of a second. The measured voltage will bleed off through the resistors when the input stops.
There is another method with an opto-isolator if that is necessary.