Last active
August 29, 2015 13:56
-
-
Save redroot/8932682 to your computer and use it in GitHub Desktop.
NewRelic: Delete Servers with No Data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| window.confirm = function() { | |
| console.log.apply(console, arguments); return true; | |
| }; | |
| $(".host_status[data-traffic_light_level=3], .host_status[data-traffic_light_level=4]").each(function(i,el){ | |
| var p = $(this).parent(); | |
| var del = $(p).find(".delete_link.to_spinner"); | |
| var no_data = $(p).find(".no_data").length > 0; | |
| if(no_data && del.length > 0){ | |
| setTimeout(function() { | |
| console.log($(p).find(".app_name").text()); | |
| del.trigger("click"); | |
| },100+(i*1000)); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment