Condition: User Defined Custom Condition: if ($self->TransactionObj->Type eq 'Create' || $self->TransactionObj->Type eq 'Status' || ($self->TransactionObj->Type eq 'Set' && $self->TransactionObj->Field eq "Queue")) { return(1); } else { return(undef); } Action: User Defined Custom action preparation code: 1; Custom action cleanup code: { my %hosts = qw( Queue-Name1 definedNagiosHost1.domain.com Queue-Name2 definedNagiosHost2.domain.com ); my $nscaBin = '/usr/local/nagios/libexec/send_nsca'; my $nscaCfg = '/usr/local/nagios/etc/send_nsca.cfg'; my $nscaHst = ''; foreach my $QueueName (keys %hosts) { my $hostname = $hosts{$QueueName}; my $TicketsObj = RT::Tickets->new($RT::SystemUser); $TicketsObj->LimitStatus(VALUE => 'open'); $TicketsObj->LimitStatus(VALUE => 'new'); $TicketsObj->LimitQueue(VALUE => $QueueName); my $count = $TicketsObj->Count(); if ($count eq '0') { system("printf \"$hostname\t$QueueName\t0\t$QueueName: No Alerts\n\" | $nscaBin -H $nscaHst -c $nscaCfg"); } else { system("printf \"$hostname\t$QueueName\t2\t$QueueName: Open Alert(s)\n\" | $nscaBin -H $nscaHst -c $nscaCfg"); } } 1; }