Somesh Sharma
Somesh Sharma

Reputation: 1

New Relic nri flex integration to alert password expiry of users like tomcat fuse wpms oracle

I have 1 automation to do through new relic monitoring tool i hato make a custom warning alert integration in new relic to check the password expiry of users like tomcat, fuse, oracle, wpms Till now I achieved that through creating a yaml file for a single user but i need a single yml for multiple users and i am stuck as there are some limitations under new relic to write the script.

Created a yml file as per the new relic integration and checking the output of that code in new relic query builder

Here is my code, when i am running it giving me syntax error

for user in tomcat fuse wpms oracle do;todaydat=date +%s;passexpdate=chage -l $user | grep "Password expires" | awk -F':' '{print $2}';passexp=date -d "$passexpdate" +%s;exp=expr \( $passexp - $todaydat \);expday=expr \( $exp / 86400 \);colmnnam=expday;echo "$user $passexp $expday" done

Upvotes: 0

Views: 168

Answers (0)

Related Questions