Rt-remind help

Hi everyone,

I want to thank u all for the previous postings. Please, I’m currently running rt 3.0.11, perl 5.8.3, apache webserver with mod_perl on redhat linux. I’m very new to RT and perl and I really don’t know how to go about certain things at present.

Please, I’ve been working on sending escalation email works. Please, how can I use the rt-remind script? I’ve downloaded rt-remind but it’s a text file. Am I meant to create a module from the script. Can someone give me the parameters for running the cronjob to use rt-remind?

Please, I would be very grateful for any assistance.

Thanks.

All.

ALL-NEW Yahoo! Messenger - all new features - even more fun!

Here’s what we’ve done for reminders:

edit the remind script to run on “foo” queue

set up a cron to run every morning.

For escalation:

You want to do something like this:

          • /opt/rt3/bin/rt-crontool --search
            RT::Search::ActiveTicketsInQueue --s earch-arg support --condition
            RT::Condition::UntouchedInMinutes --condition-arg 1,24 --action
            RT::Action::SetPriority --action-arg 10On Wed, 19 Jan 2005, Oluwatomisin Ilori wrote:

}
}
}Hi everyone,
}
}I want to thank u all for the previous postings. Please, I’m currently running rt 3.0.11, perl 5.8.3, apache webserver with mod_perl on redhat linux. I’m very new to RT and perl and I really don’t know how to go about certain things at present.
}
}Please, I’ve been working on sending escalation email works. Please, how can I use the rt-remind script? I’ve downloaded rt-remind but it’s a text file. Am I meant to create a module from the script. Can someone give me the parameters for running the cronjob to use rt-remind?
}
}Please, I would be very grateful for any assistance.
}
}Thanks.
}
}All.
}
}
}---------------------------------
} ALL-NEW Yahoo! Messenger - all new features - even more fun!

Matthew Joseff, Director Technical Operations
§ 703.519.1066 (f) 703.548.9151 (m) 202.415.6261
YellowBrix - Transforming Content Into Action.

Thanks matthew for the response. I understand the cronjob now but the problem i have with rt-remind is how to run it from rt and use it in a cronjob and what parameters would i pass to it.
Thanks again

ALL-NEW Yahoo! Messenger - all new features - even more fun!

You’ll have to edit the script. Check for:

Nobody
root
my($queuename)
my($from)
my($sendmail)
$msg .= "Subject:

and make the neccessary changes.

Then just add to cron something like:

40 7 * * 1-5 root /opt/rt3/bin/remind-devtasks.pl -A > /dev/null 2>&1On Wed, 19 Jan 2005, Oluwatomisin Ilori wrote:

}Thanks matthew for the response. I understand the cronjob now but the problem i have with rt-remind is how to run it from rt and use it in a cronjob and what parameters would i pass to it.
}Thanks again
}
}
}---------------------------------
} ALL-NEW Yahoo! Messenger - all new features - even more fun!

Matthew Joseff, Director Technical Operations
§ 703.519.1066 (f) 703.548.9151 (m) 202.415.6261
YellowBrix - Transforming Content Into Action.

Thanks matthew. I would do that now. can i install rt-remind in rt/lib or where should i install it and am I to copy the rt-remind text file alone or should i save it with a perl file extension. thanks so much.

ALL-NEW Yahoo! Messenger - all new features - even more fun!

We’ve got it installed in $RTDIR/binOn Wed, 19 Jan 2005, Oluwatomisin Ilori wrote:

}Thanks matthew. I would do that now. can i install rt-remind in rt/lib or where should i install it and am I to copy the rt-remind text file alone or should i save it with a perl file extension. thanks so much.
}
}
}
}---------------------------------
} ALL-NEW Yahoo! Messenger - all new features - even more fun!

Matthew Joseff, Director Technical Operations
§ 703.519.1066 (f) 703.548.9151 (m) 202.415.6261
YellowBrix - Transforming Content Into Action.

Oluwatomisin,

Take a look at the instructions here:
http://wiki.bestpractical.com/index.cgi?UseRtReminder

  1. You put a copy of rt-remind.pm in your /yourRTinstalldir/lib/RT
    directory, for me it’s in /usr/local/rt3/lib/RT (Yes it really needs to
    be in the lib/RT directory).
  2. Then you edit the configuration parameters on the file (what email
    addresses, etc…).
    When I first tried it, it didn’t work. So I typed “which sendmail” and
    saw that my FreeBSD 4.11 sendmail is /usr/sbin/sendmail
    so I changed rt-remind.pm to match my setup:

Path to sendmail and flags

#my($sendmail) = “/usr/lib/sendmail -t”;
my($sendmail) = “/usr/sbin/sendmail -t”;
3) You need to make the file executable (e.g. chmod 755 rt-remind.pm).
4) You’ll want to manually test it before setting up a cron job. With
no flags it only shows high priority tickets, with -A flag it shows all
new,open,stalled tickets.
When I first tested (w/o reading all of the instructions) I just tried
./rt-remind.pm without flags and I didn’t get any emails (because I
don’t typically use ticket priorities).
To test, cd to /yourRTinstalldir/lib/RT and type
./rt-remind.pm -A
5) Edit your crontabs if you want to happen automatically (e.g. crontab
-e). My crontab entry sends a reminder once a week:
0 6 * * 1 /usr/local/rt3/lib/RT/rt-remind.pm -A

Good luck,
Mike

Thanks so much Mike for the detailed information. I seem to grab the gist now. I didn’t know how to go about it at first. Would try that out now. Thanks once again.

ALL-NEW Yahoo! Messenger - all new features - even more fun!

Thanks so much Mike for the detailed information. I seem to grab the gist now. I didn’t know how to go about it at first. Would try that out now. Thanks once again everyone for the contributions.

ALL-NEW Yahoo! Messenger - all new features - even more fun!

Thanks Mike for the detailed steps in using rt-remind. I did everything exactly as u said but I get this error when i run rt-remind from the installation directory which is /usr/local/rt3/lib/RT

[root@rt1 Action]# ./rt-remind.pm
Can’t locate RT/Interface/CLI.pm in @INC (@INC contains: /opt/rt3/lib/RT /usr/local/packages/rt/local/library /usr/local/perl-5.8.6/lib/5.8.6/i686-linux /usr/local/perl-5.8.6/lib/5.8.6 /usr/local/perl-5.8.6/lib/site_perl/5.8.6/i686-linux /usr/local/perl-5.8.6/lib/site_perl/5.8.6 /usr/local/perl-5.8.6/lib/site_perl .) at ./rt-remind.pm line 93.
BEGIN failed–compilation aborted at ./rt-remind.pm line 93.

what else do I need to do?
Thanks.

ALL-NEW Yahoo! Messenger - all new features - even more fun!

I’m currently running rt 3.2.2 on Linux 8.0, perl 5.8.3, Apache 1.19 statically compiled with mod_perl 1 and mySQL 4.1.9.
I’m trying to use Ruslan’s module to send emails to a particular person when a ticket has not been resolved 22 hours after it is created. However, I do not get any emails. Please, can anyone point me in the right direction. I’m running the cronjob below:

0 1 * * * /opt/rt3/bin/rt-crontool --search RT::Search::FromSQL --search-arg “Status !=‘resolved’ AND Created=‘22 hours ago’ AND Queue=‘VSATFaults’” --action RT::Action::NotifyGroup --action-arg tosin@rt1.ipnxtelecoms.com --template ‘UnresolvedTickets’

Thanks.

ALL-NEW Yahoo! Messenger - all new features - even more fun!

Oluwatomisin Ilori wrote:

I’m currently running rt 3.2.2 on Linux 8.0, perl 5.8.3, Apache 1.19
statically compiled with mod_perl 1 and mySQL 4.1.9.
I’m trying to use Ruslan’s module to send emails to a particular person
when a ticket has not been resolved 22 hours after it is created.
However, I do not get any emails. Please, can anyone point me in the
right direction. I’m running the cronjob below:

0 1 * * * /opt/rt3/bin/rt-crontool --search RT::Search::FromSQL
–search-arg “Status !=‘resolved’ AND Created=‘22 hours ago’ AND
Queue=‘VSATFaults’” --action RT::Action::NotifyGroup --action-arg
tosin@rt1.ipnxtelecoms.com mailto:tosin@rt1.ipnxtelecoms.com
–template 'UnresolvedTickets’
Thanks.

May be it is not user friendly but module supprt only IDs as argument
now. So find your user via WebUI and see his #ID number and put it in
argument. You can group different IDs, use ‘;’ as separator.

Thanks…it worked.

ALL-NEW Yahoo! Messenger - all new features - even more fun!

Thanks Ruslan, but 'm still not getting any emails. This is the cronjob I’m running based on the modifications i just made. I changed the users to their ID’s.

10 * * * * /opt/rt3/bin/rt-crontool --search RT::Search::FromSQL --search-arg “Status !=‘resolved’ AND Created=‘24 hours ago’ AND Queue=‘RadioFaults’” --action RT::Action::NotifyGroup --action-arg 22;89;70;71 --template-id 13

ALL-NEW Yahoo! Messenger - all new features - even more fun!

You should have some debug info in log.

Oluwatomisin Ilori wrote:

Thanks. This is what is in rt.log:

[Tue Feb 1 02:54:36 2005] [error]: Couldn’t load principal # (/opt/rt3/local/lib/RT/Action/NotifyGroup.pm:72)

[Tue Feb 1 02:54:36 2005] [warning]: User #1 has no email address (/opt/rt3/local/lib/RT/Action/NotifyGroup.pm:98)

[Tue Feb 1 02:54:36 2005] [crit]: Can’t call method “CreatorObj” on an undefined value at /opt/rt3/local/lib/RT/Action/NotifyGroup.pm line 54.

(/opt/rt3/lib/RT.pm:276)

[Tue Feb 1 02:55:35 2005] [error]: Couldn’t load principal # (/opt/rt3/local/lib/RT/Action/NotifyGroup.pm:72)

[Tue Feb 1 02:55:35 2005] [warning]: User #1 has no email address (/opt/rt3/local/lib/RT/Action/NotifyGroup.pm:98)

[Tue Feb 1 02:55:35 2005] [crit]: Can’t call method “CreatorObj” on an undefined value at /opt/rt3/local/lib/RT/Action/NotifyGroup.pm line 54.

(/opt/rt3/lib/RT.pm:276)

ALL-NEW Yahoo! Messenger - all new features - even more fun!

This is the cronjob I’m running

10 * * * * /opt/rt3/bin/rt-crontool --search RT::Search::FromSQL
–search-arg “Status !=‘resolved’ AND Created=‘24 hours ago’ AND
Queue=‘RadioFaults’” --action RT::Action::NotifyGroup --action-arg
22;89;70;71 --template-id 13

Thanks. This is what is in rt.log:

[Tue Feb 1 02:54:36 2005] [error]: Couldn’t load principal #
(/opt/rt3/local/lib/RT/Action/NotifyGroup.pm:72)

[Tue Feb 1 02:54:36 2005] [warning]: User #1 has no email address
(/opt/rt3/local/lib/RT/Action/NotifyGroup.pm:98)

[Tue Feb 1 02:54:36 2005] [crit]: Can’t call method “CreatorObj” on an
undefined value at /opt/rt3/local/lib/RT/Action/NotifyGroup.pm line 54.

(/opt/rt3/lib/RT.pm:276)

[Tue Feb 1 02:55:35 2005] [error]: Couldn’t load principal #
(/opt/rt3/local/lib/RT/Action/NotifyGroup.pm:72)

[Tue Feb 1 02:55:35 2005] [warning]: User #1 has no email address
(/opt/rt3/local/lib/RT/Action/NotifyGroup.pm:98)

[Tue Feb 1 02:55:35 2005] [crit]: Can’t call method “CreatorObj” on an
undefined value at /opt/rt3/local/lib/RT/Action/NotifyGroup.pm line 54.

(/opt/rt3/lib/RT.pm:276)

ALL-NEW Yahoo! Messenger
*

  • all new features - even more fun!** *

ALL-NEW Yahoo! Messenger - all new features - even more fun!

Please, can anyone help with this. I’m trying to use ruslan’s notifygroup module from rt-crontool and i keep getting this error. please, can anyone help out? I ran rt-notify-group-admin from the command line and that ran without any error. please can i use that it from crontool? please, any help would be needed.

The command I’m running from crontool is:

[root@rt1 bin]# ./rt-crontool --search RT::Search::FromSQL --search-arg “Queue=‘VSATFaults’ AND Status!=‘resolved’” --action RT::Action::NotifyGroup --action-arg Test --template-id 13

The error message I get is:
“my” variable $search masks earlier declaration in same scope at ./rt-crontool line 107.
“my” variable $tickets masks earlier declaration in same scope at ./rt-crontool line 116.
Subroutine loc redefined at ./rt-crontool line 177.
[Thu Feb 3 10:07:16 2005] [crit]: Can’t call method “CreatorObj” on an undefined value at /opt/rt3/local/lib/RT/Action/NotifyGroup.pm line 54.
(/opt/rt3/lib/RT.pm:276)
Thanks so much.

Hello.
Ilori, can you remember some rules?

  1. you MUST allways add mailing list address to Cc when you reply.
  2. quote part of the previous message

Did you run this with rt-crontool?

Oluwatomisin Ilori wrote:

Thanks. This is what is in rt.log:

[Tue Feb 1 02:54:36 2005] [error]: Couldn’t load principal #
(/opt/rt3/local/lib/RT/Action/NotifyGroup.pm:72)

[Tue Feb 1 02:54:36 2005] [warning]: User #1 has no email address
(/opt/rt3/local/lib/RT/Action/NotifyGroup.pm:98)

[Tue Feb 1 02:54:36 2005] [crit]: Can’t call method “CreatorObj” on an
undefined value at /opt/rt3/local/lib/RT/Action/NotifyGroup.pm line 54.

(/opt/rt3/lib/RT.pm:276)

[Tue Feb 1 02:55:35 2005] [error]: Couldn’t load principal #
(/opt/rt3/local/lib/RT/Action/NotifyGroup.pm:72)

[Tue Feb 1 02:55:35 2005] [warning]: User #1 has no email address
(/opt/rt3/local/lib/RT/Action/NotifyGroup.pm:98)

[Tue Feb 1 02:55:35 2005] [crit]: Can’t call method “CreatorObj” on an
undefined value at /opt/rt3/local/lib/RT/Action/NotifyGroup.pm line 54.

(/opt/rt3/lib/RT.pm:276)


ALL-NEW Yahoo! Messenger
*

  • all new features - even more fun!** *

ALL-NEW Yahoo! Messenger - all new features - even more fun!