Include environment in rsyslog server searches, correct search for rsyslog port attribute

(cherry picked from commit f67b712cb2bdea30b4af2cee12cf52629060fdcb)