NONPROD:abcd123456_DBSERVERNeed to extract abcd123456 from the string...
Without the full context of the string or knowing which parts are fixed, I have guessed you want anything between the colon and the underscore:
| rex ":(?<hostname>[^_]+)_"