2 Replies Latest reply: Mar 2, 2012 4:35 PM by Ian Springer RSS

Repeated discovery of unneeded resources

Elias Ross Master

The MySQL plugin 'discovers' the list of tables and creates resources for each one. For my application, we create new hundreds of new database tables constantly which are soon dropped.

 

Is there a potential problem with adding these tables to the discovery queue? Should I attempt to patch the plugin to ignore these tables entirely?

 

If there's no issue, then perhaps I do not need to address this at all.

 

Actually, I'd rather prefer it if discovery was disabled (or could be) on a server or host basis. Is there such a way? Thanks.

  • 1. Re: Repeated discovery of unneeded resources
    Elias Ross Master

    Seems to me that it's really up to each resource. I have added a flag in this case to the MySql plugin.

     

    It would be kind of nice if this was made more general, where for every resource you could somehow disable discovery.

  • 2. Re: Repeated discovery of unneeded resources
    Ian Springer Master

    Non-top-level-servers or services are auto-imported into inventory. If they later become defunct (i.e. their underlying tables go away), RHQ has no builtin mechanism to automatically uninventory them. That means you'll have to manually univentory table resources once they become defunct, otherwise you'll end up with a whole bunch of DOWN table resources in inventory that correspond to tables that no longer exist.

     

    So I'd say you probably don't want to autodiscover the short-lived tables.

     

    One potential way to tell the plugin which tables are short-lived and which are not would be to add a "excludedTablesRegex" plugin configuration property to the parent resource type (database?). The table discovery component could then exclude any tables whose names match that regex.