Skip to content

Instantly share code, notes, and snippets.

@redroot
Last active August 29, 2015 13:56
Show Gist options
  • Select an option

  • Save redroot/8932682 to your computer and use it in GitHub Desktop.

Select an option

Save redroot/8932682 to your computer and use it in GitHub Desktop.
NewRelic: Delete Servers with No Data
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