RTx::Shredder question

Has anyone tested RTx::Shredder patches with RT 3.0.10?

Thanks,
-anyaFrom: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of
rt-users-request@lists.bestpractical.com
Sent: Thursday, April 07, 2005 6:14 AM
To: rt-users@lists.bestpractical.com
Subject: RT-Users Digest, Vol 13, Issue 38

Send RT-Users mailing list submissions to
rt-users@lists.bestpractical.com

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
or, via email, send a message with subject or body ‘help’ to
rt-users-request@lists.bestpractical.com

You can reach the person managing the list at
rt-users-owner@lists.bestpractical.com

When replying, please edit your Subject line so it is more specific than
"Re: Contents of RT-Users digest…"

Today’s Topics:

  1. RT always tries authenticate me every time I click a link.
    (jay alvarez)
  2. 10 newest unowned tickets… bug? (Tim Bishop)
  3. RT and Nagios? (Thomas Earl)
  4. Re: Showing stalled tickets (Drew Barnes)
  5. RE: RT and Nagios? (Norton, Ian)
  6. Re: 10 newest unowned tickets… bug? (Russell Mosemann)
  7. Re: Showing stalled tickets (Russell Mosemann)
  8. Handling user sessions? (Tomas A. P. Olaj)
  9. Re: Handling user sessions? (Jesse Vincent)
  10. Cascade delete tool? (Tomas A. P. Olaj)
  11. RT administration tips (Jesse Vincent)
  12. Re: Cascade delete tool? (Jesse Vincent)

Message: 1
Date: Thu, 7 Apr 2005 02:23:26 -0700 (PDT)
From: jay alvarez rtb0y@yahoo.com
Subject: [rt-users] RT always tries authenticate me every time I click
a link.
To: rt-users@lists.bestpractical.com
Message-ID: 20050407092327.17554.qmail@web42108.mail.yahoo.com
Content-Type: text/plain; charset=us-ascii

Hi,
I have a problem. Before, I only log in once at rt’s login page. But now,
for some reasons, whenever I click a link at the top left of RT, eg;RTFM,
Preferences, Tickets, Tools, Configurations etc. rt always redirects me to
its log-in page as if it did not remember my account the very first time I
log into it.
This is weird because I haven’t experience it before. Sometimes I can
access the link without being redirected to rt’s login page, and
unfortunately sometimes not.

Do you have any idea why this is happening?

Thanks a lot…

Yahoo! Messenger
Show us what our next emoticon should look like. Join the fun.
http://www.advision.webevents.yahoo.com/emoticontest

Message: 2
Date: Thu, 7 Apr 2005 10:31:21 +0100
From: Tim Bishop tim-lists@bishnet.net
Subject: [rt-users] 10 newest unowned tickets… bug?
To: rt-users@lists.bestpractical.com
Message-ID: 20050407093121.GB38492@carrick.bishnet.net
Content-Type: text/plain; charset=us-ascii

Can someone else confirm that this is correct:

The 10 newest unowned tickets panel shows the 10 newest unowned tickets
across all queues, but only those for queues which you have the right to
see?

Rather than the 10 newest unowned tickets on queues which you have the right
to see.

The latter seems more useful, to me.

Cheers,
Tim.

Tim Bishop
http://www.bishnet.net/tim/
PGP Key: 0x5AE7D984

Message: 3
Date: Thu, 07 Apr 2005 07:48:02 -0400
From: Thomas Earl tearl@cacdhh.org
Subject: [rt-users] RT and Nagios?
To: Request Tracker rt-users@lists.bestpractical.com
Message-ID: 1112874482.3451.35.camel@linux.cacdhh.org
Content-Type: text/plain

Greetings to all,

Has anyone intergrated RT with Nagios? Doesn’t seem like alot of
intergration, but one thing that I’m trying to figure out is Nagios send
out email for an alarm, but it will send on an DOWN and a UP. If I want
those to be under the same ticket, how do I do that?

Thanks,

Tom

Message: 4
Date: Thu, 07 Apr 2005 08:13:49 -0400
From: Drew Barnes barnesaw@ucrwcu.rwc.uc.edu
Subject: Re: [rt-users] Showing stalled tickets
To: Tim Bishop tim-lists@bishnet.net
Cc: rt-users@lists.bestpractical.com
Message-ID: 425523FD.1060209@ucrwcu.rwc.uc.edu
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Tim Bishop wrote:

I want to make stalled tickets show up in the “10 highest priority
tickets I own” on the home screen, and when you click on a queue name
under “Quick search”.

Both look like relatively simple changes in Elements/MyTickets and
Elements/Quicksearch. But, I’d like to do this using something like the
Callback stuff - since I’d prefer not to modify the RT code itself. Is
this doable?

Instead of modifying share/html/Elements/QuickSearch, copy it to
local/html/Elements/QuickSearch and modify it there. The local copy
will override the share copy and you haven’t modified the code, really,
as simply removing the local file will make RT revert to the original setup.

DB

Drew Barnes
Applications Analyst
Raymond Walters College
University of Cincinnati

Message: 5
Date: Thu, 7 Apr 2005 13:46:17 +0100
From: “Norton, Ian” i.norton@lancaster.ac.uk
Subject: RE: [rt-users] RT and Nagios?
To: “Thomas Earl” tearl@cacdhh.org, "Request Tracker"
rt-users@lists.bestpractical.com
Message-ID:
7F332A8009EE5D4CB62C87717A3498A10C79CE63@exchange-be1.lancs.ac.uk
Content-Type: text/plain; charset=“us-ascii”

Hi Tom,

I did this about two years ago for our own requirements,
but it wasn’t and still isn’t very pretty :slight_smile:

The approach that I took was as follows:

Don’t use the nagios email notification
Write a perl module to read the nagios status information
Write a perl module to query RT (Which you can probably do using the
RT API)
I only notify of the outage and not of the return to service.
We don’t want flapping hosts to spam the ticket
We want our operations desk to investigate potential problems, check
graphs etc.
Use Nagios’s comment field to store the ticket numbers for this host
Use Nagios’s host notification field to log if RT knows about the
problem

I have a note of my script algorithm :

If nagios has been restarted in the last 30 mins, exit until things
stabilise
We did this because we were getting a flood of tickets after each
restart.
I think it’s something to do with hard and soft states, but I can’t
remember now!

Get a list of hosts that are up but have notification disabled.
Is the ticket related to this host still open?
No - enable notifications for this host

Get a list of hosts that are down and notifications are enabled.
For each host
Is there a ticket open for this host?
No - Track down the parent host that starts the outage
Disable notifications for hosts from parent downwards
Mail RT with the details
Search RT to get the ticket number and log it as a nagios
comment
on the host.

I’m using the host IP address to search RT and the email that goes to RT
has
a complete list of the hosts with IP address for searching.

The code I have is based around our own network management system and
doesn’t
rely entirely on nagios to build the host hierarchy, but I’m sure it
could be done.

If I was re-implementing the whole thing now, I’d probably use custom
fields to store the
IP addresses in the ticket and change the ticket injection to be direct
via the RT API
rather than doing things by email. Our eventual intention is to do this
via SOAP from
a central stats and status server that knows about all the nagios
instances and hosts on
each system, but that’s probably some way off yet!

Hope this helps you a little.

Regards, Ian.

From: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Thomas
Earl
Sent: 07 April 2005 12:48
To: Request Tracker
Subject: [rt-users] RT and Nagios?

Greetings to all,

Has anyone intergrated RT with Nagios? Doesn’t seem like alot of
intergration, but one thing that I’m trying to figure out is Nagios send
out email for an alarm, but it will send on an DOWN and a UP. If I want
those to be under the same ticket, how do I do that?

Thanks,

Tom

http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

RT Administrator and Developer training is coming to your town soon!
(Boston, San Francisco, Austin, Sydney) Contact
training@bestpractical.com for details.

Be sure to check out the RT Wiki at http://wiki.bestpractical.com

Message: 6
Date: Thu, 7 Apr 2005 07:47:50 -0500 (CDT)
From: Russell Mosemann mose@ns.cune.edu
Subject: Re: [rt-users] 10 newest unowned tickets… bug?
To: Tim Bishop tim-lists@bishnet.net
Cc: rt-users@lists.bestpractical.com
Message-ID: Pine.SOL.4.21.0504070746030.11329-100000@ns.cune.edu
Content-Type: TEXT/PLAIN; charset=US-ASCII

The 10 newest unowned tickets panel shows the 10 newest unowned tickets
across all queues, but only those for queues which you have the right to
see?

but only for those queues for which you have the ShowTicket right.

Rather than the 10 newest unowned tickets on queues which you have the
right to see.

That’s basically what you said above.

Russell Mosemann, Ph.D. * Computing Services * Concordia University,
Nebraska
"Did you hear about the little devil who got run over by a lawn mower?
He went to the local liquor store because he heard they retailed spirits."

Message: 7
Date: Thu, 7 Apr 2005 07:54:42 -0500 (CDT)
From: Russell Mosemann mose@ns.cune.edu
Subject: Re: [rt-users] Showing stalled tickets
To: Tim Bishop tim-lists@bishnet.net
Cc: rt-users@lists.bestpractical.com
Message-ID: Pine.SOL.4.21.0504070748180.11329-100000@ns.cune.edu
Content-Type: TEXT/PLAIN; charset=US-ASCII

I want to make stalled tickets show up in the “10 highest priority
tickets I own” on the home screen, and when you click on a queue name
under “Quick search”.

They are easy changes. Copy rt3/share/html/Elements/MyRequests, MyTickets
and Quicksearch to the local tree and everywhere it has

Status = 'new' OR Status = 'open'

change it to

Status = 'new' OR Status = 'open' OR Status = 'stalled'

Russell Mosemann, Ph.D. * Computing Services * Concordia University,
Nebraska
"Did you hear about the missionaries who went to witness to the
cannibals? The missionaries gave them their first taste of religion."

Message: 8
Date: Thu, 7 Apr 2005 14:55:41 +0200 (CEST)
From: “Tomas A. P. Olaj” tomas.olaj@usit.uio.no
Subject: [rt-users] Handling user sessions?
To: rt-users@lists.bestpractical.com
Message-ID: Pine.LNX.4.58-L.0504071447370.13228@attila.uio.no
Content-Type: TEXT/PLAIN; charset=US-ASCII

Hi,

I notice that session data are stored locally under
RT_PATH/var/session_data. But there’s also an empty session table in the
RT database (we use Postgres).

In the future we need a system that can scale after need, and with
failover. So we need:

  • database and webserver on different machines.
  • a webserver cluster solution

Thus we need to find out how RT handles sessions data, so we can configure
a cluster solution.

  • database cluster/replication

The question may be; how can we change the default local file handling of
sessions data to use the sessions table instead, so we can put more than 1
webserver in front as a failover solution?

Tomas A. P. Olaj, email: tomas.olaj@usit.uio.no, web: folk.uio.no/tomaso
University of Oslo / USIT (Center for Information Technology Services)
System- and Application Management / Applications Management Group

Message: 9
Date: Thu, 7 Apr 2005 08:57:54 -0400
From: Jesse Vincent jesse@bestpractical.com
Subject: Re: [rt-users] Handling user sessions?
To: “Tomas A. P. Olaj” tomas.olaj@usit.uio.no
Cc: rt-users@lists.bestpractical.com
Message-ID: 20050407125754.GG22996@bestpractical.com
Content-Type: text/plain; charset=us-ascii

Hi,

I notice that session data are stored locally under
RT_PATH/var/session_data. But there’s also an empty session table in the
RT database (we use Postgres).

Have you set RT::WebSessionClass? These days, RT should be defaulting
to sticking sessions in the database?

Jesse

Message: 10
Date: Thu, 7 Apr 2005 15:08:19 +0200 (CEST)
From: “Tomas A. P. Olaj” tomas.olaj@usit.uio.no
Subject: [rt-users] Cascade delete tool?
To: rt-users@lists.bestpractical.com
Message-ID: Pine.LNX.4.58-L.0504071506330.13228@attila.uio.no
Content-Type: TEXT/PLAIN; charset=US-ASCII

Only a curious question.

Just a short question if BP are working with a cascade deletion tool, for
cleaning up users, queues, and so on. I like to keep things tidy. :wink:

Tomas A. P. Olaj, email: tomas.olaj@usit.uio.no, web: folk.uio.no/tomaso
University of Oslo / USIT (Center for Information Technology Services)
System- and Application Management / Applications Management Group

Message: 11
Date: Thu, 7 Apr 2005 09:11:44 -0400
From: Jesse Vincent jesse@bestpractical.com
Subject: [rt-users] RT administration tips
To: rt-users@lists.bestpractical.com
Message-ID: 20050407131144.GH22996@bestpractical.com
Content-Type: text/plain; charset=us-ascii

Let’s say that someone were writing a book about RT and that that book
had a chapter on “Tips and Howtos for RT administrators.” What would
you want to see in that chapter? Please reply only to me, NOT to the
list. (And yes, I promise to be a bit less cloak and dagger in the near
future)

Jesse

Message: 12
Date: Thu, 7 Apr 2005 09:13:34 -0400
From: Jesse Vincent jesse@bestpractical.com
Subject: Re: [rt-users] Cascade delete tool?
To: “Tomas A. P. Olaj” tomas.olaj@usit.uio.no
Cc: rt-users@lists.bestpractical.com
Message-ID: 20050407131334.GI22996@bestpractical.com
Content-Type: text/plain; charset=us-ascii

This question is probably more for Ruslan, but I thought I’d email the
list in case it’s something obvious.

On a test system, we shredded about 25000 tickets in our Spam queue and
that all went well… took about 4 days. (I had to hack the rtx-shredder
script so it wouldn’t write the sqldump restore files to save on disk
space).

Then I disabled all 22000 spammer user accounts (we only have about 100
real accounts), and tried shredding all 22000 disabled accounts. It ran
for an hour and then died with this error:

[Mon Oct 3 17:34:18 2005] [crit]: couldn’t find resolver for dependency
’RT::User-37898 (depends on,resolvable dependency) RT::Ticket-3612’ at
/usr/local/rt3/lib/RTx/Shredder/Dependency.pm line 87, line 1.
(/usr/local/rt3/lib/RT.pm:295)

I tried running the script again and this time i got a slightly
different but similar error:

[Mon Oct 3 17:43:22 2005] [crit]: couldn’t find resolver for dependency
’RT::User-66 (depends on,resolvable dependency) RT::Attachment-1865’ at
/usr/local/rt3/lib/RTx/Shredder/Dependency.pm line 87, line 1.
(/usr/local/rt3/lib/RT.pm:295)

Every time after that I tried to run it, it would immediately die with
the same error.

So my question: Is this because the some disabled users might still
own tickets? Or could it be that in shredding my spam tickets, i
messed up my database somehow and now can’t shred my disabled users?

I’m using the CLI of version 0.02_02.

Cheers!

–Andy

This question is probably more for Ruslan, but I thought I’d email the
list in case it’s something obvious.

On a test system, we shredded about 25000 tickets in our Spam queue and
that all went well… took about 4 days. (I had to hack the rtx-shredder
script so it wouldn’t write the sqldump restore files to save on disk
space).

Then I disabled all 22000 spammer user accounts (we only have about 100
real accounts), and tried shredding all 22000 disabled accounts. It ran
for an hour and then died with this error:
This error mean next: Field Creator or LastUpdatedBy of the
RT::Ticket-3612 is link to the user RT::User-37898. This links are
minor dependencies, but you have to resolve them with
’replace_relations’ option of the Users plugin, for example sane
values are nobody’s id.

Sorry, I must add better coverage for this, but please read below how
to analize if you are in troubles or not.

[Mon Oct 3 17:34:18 2005] [crit]: couldn’t find resolver for dependency
’RT::User-37898 (depends on,resolvable dependency) RT::Ticket-3612’ at
/usr/local/rt3/lib/RTx/Shredder/Dependency.pm line 87, line 1.
(/usr/local/rt3/lib/RT.pm:295)
Ok, could you check ticket #3612? Does RT show it ok? Why it has
dependency on that user?

Do you have sqldumps for last runs when you were deleting users?

I tried running the script again and this time i got a slightly
different but similar error:

[Mon Oct 3 17:43:22 2005] [crit]: couldn’t find resolver for dependency
’RT::User-66 (depends on,resolvable dependency) RT::Attachment-1865’ at
/usr/local/rt3/lib/RTx/Shredder/Dependency.pm line 87, line 1.
(/usr/local/rt3/lib/RT.pm:295)

Every time after that I tried to run it, it would immediately die with
the same error.

So my question: Is this because the some disabled users might still
own tickets? Or could it be that in shredding my spam tickets, i
messed up my database somehow and now can’t shred my disabled users?

I’m using the CLI of version 0.02_02.

Cheers!

–Andy

Best regards, Ruslan.

Ruslan Zakirov wrote:

This error mean next: Field Creator or LastUpdatedBy of the
RT::Ticket-3612 is link to the user RT::User-37898. This links are
minor dependencies, but you have to resolve them with
’replace_relations’ option of the Users plugin, for example sane
values are nobody’s id.

Okay I’ll try it with the replace_relations for Nobody.

[Mon Oct 3 17:34:18 2005] [crit]: couldn’t find resolver for dependency
’RT::User-37898 (depends on,resolvable dependency) RT::Ticket-3612’ at
/usr/local/rt3/lib/RTx/Shredder/Dependency.pm line 87, line 1.
(/usr/local/rt3/lib/RT.pm:295)

Ok, could you check ticket #3612? Does RT show it ok? Why it has
dependency on that user?

The ticket looks okay… only person connected is Nobody (enabled)… I’m
not getting that error anymore. Now I get this one:

./rtx-shredder --plugin
’Users=status,disabled;limit=30000;replace_relations=10’
[Wed Oct 5 22:31:30 2005] [crit]: couldn’t find resolver for dependency
’RT::User-66 (depends on,resolvable dependency) RT::Attachment-1865’ at
/usr/local/rt3/lib/RTx/Shredder/Dependency.pm line 87, line 1.
(/usr/local/rt3/lib/RT.pm:295)

I can’t figure it out… User-66 is a spam user. Attachment-1865 is
connected to ticket 248… it does not seem to have anything to do with
User-66 that I can tell. 248 has no disabled users on it that I can
see. Strange.

Do you have sqldumps for last runs when you were deleting users?

Nah. But it was only a test database… I’m going to do the migration
this weekend.

Ruslan Zakirov wrote:

This error mean next: Field Creator or LastUpdatedBy of the
RT::Ticket-3612 is link to the user RT::User-37898. This links are
minor dependencies, but you have to resolve them with
’replace_relations’ option of the Users plugin, for example sane
values are nobody’s id.

Okay I’ll try it with the replace_relations for Nobody.

[Mon Oct 3 17:34:18 2005] [crit]: couldn’t find resolver for dependency
’RT::User-37898 (depends on,resolvable dependency) RT::Ticket-3612’ at
/usr/local/rt3/lib/RTx/Shredder/Dependency.pm line 87, line 1.
(/usr/local/rt3/lib/RT.pm:295)

Ok, could you check ticket #3612? Does RT show it ok? Why it has
dependency on that user?

The ticket looks okay… only person connected is Nobody (enabled)… I’m
not getting that error anymore. Now I get this one:

./rtx-shredder --plugin
’Users=status,disabled;limit=30000;replace_relations=10’
[Wed Oct 5 22:31:30 2005] [crit]: couldn’t find resolver for dependency
’RT::User-66 (depends on,resolvable dependency) RT::Attachment-1865’ at
/usr/local/rt3/lib/RTx/Shredder/Dependency.pm line 87, line 1.
(/usr/local/rt3/lib/RT.pm:295)

I can’t figure it out… User-66 is a spam user. Attachment-1865 is
connected to ticket 248… it does not seem to have anything to do with
User-66 that I can tell. 248 has no disabled users on it that I can
see. Strange.
Could you run ‘SELECT Creator, LastUpdatedBy FROM Attachments WHERE id
= 1865’ and see if it’s 66? But that’s ver strange. I should write
some tests for this.

Do you have sqldumps for last runs when you were deleting users?

Nah. But it was only a test database… I’m going to do the migration
this weekend.

Best regards, Ruslan.

Ruslan Zakirov wrote:

Could you run ‘SELECT Creator, LastUpdatedBy FROM Attachments WHERE id
= 1865’ and see if it’s 66? But that’s ver strange. I should write
some tests for this.

There isn’t a LastUpdatedBy column in my Attachments table… Should
there be? Heh. Here’s the Creator,Created columns though:

mysql> SELECT Creator,Created FROM Attachments WHERE id = 1865;
| Creator | Created |
| 66 | 2002-02-15 20:28:57 |
1 row in set (0.00 sec)
mysql>

Sure enough, Creator is 66. I’m not sure how this disabled spam user
is the Creator for an attachment on a ticket that has all enabled users
on it though.

–Andy

Ruslan,

Shreder doesn’t seem to find approval tickets. Am I
missing something?

-Todd

Approvals are on Todo list(see Todo file), I don’t know much about
approvals to work on it.On 8/3/06, Todd Chapman todd@chaka.net wrote:

Ruslan,

Shreder doesn’t seem to find approval tickets. Am I
missing something?

-Todd


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Best regards, Ruslan.

Approvals are on Todo list(see Todo file), I don’t know much about
approvals to work on it.

What’s to know? Type = ‘approval’