What your looking for is a current sensor.
You can buy one with either a 0 to 5 volt output or a 4 to 20 ma output depending on what you want to drive.
Or you could buy a current sensor that trips after a certain threshold has been exceeded. These sensors steal a tiny bit of power from the current being monitored to drive a three stage amplifier which uses two 2N4124 transistors into a MPSa14. There is hysteresis built into the circuit to prevent chattering.
Many of these use a toroid coil wound on a tape wound core which may have limited frequency response.
Some use a hall sensor placed between a tape wound core with a small slit cut into it for the hall sensor. These will have better frequency response as there are no copper turns to suck hi end.
The 4 to 20 models have a precision rectifier at the front end that feeds a low offset opamp which drives a transitor.
The 0 to 5 volt model uses Schotky diodes to rectify the toroid output. This means that there will be a slight knee at the initial detection currents. But the 0 to 5 sensor is self powered as are the current trip sensors. The 4 to 20 sensors are looped powered, usually from a 24 volt DC supply.
The current trip sensors use an open collector design, MPSa14 Darlington transistors and are adjustable with a jumper and a 4 turn pot.
Some of the models feature a split core design which means you do not have to disconnect any wires, you simply snap the sensor over the wire. Make sure nothing gets in the gap. Small particles can greatly affect the output. The split core models are a bit more money. They sell NK sensors at digikey.
https://www.nktechnologies.com/
https://www.veris.com/126822/category/current-monitoring
Or you could roll your own with one of those hi freq ferrite core CT's with a Schotky bridge into a bunch of tantalum caps separated by a resistor as to form a pi filter. Maybe a load resistor for scaling and linearity.
There is a slight bit of insertion loss with all of the sensors, some more than others, but it is pretty minuscule.
And there can be some offstage leakage on the current switches which may or may not screw things up if you are going into a PLC.