SlightlyLoony
Tera Contributor

find_real_file.pngWhen Discovery attempts to connect to an SSH server (such as a Linux or UNIX system), and when it attempts to query an SNMP agent (such as a printer, router, or UPS), it tries the credentials in the Credentials table, in no particular order, until it finds one that works. This is much like me trying to get into my locked house — I can't remember what the key looks like, so I just try all the keys on my key ring until I find the one that works. Discovery, however, is smarter than I am: for any particular device, once it finds the credential that works, it remembers it. The next time it tries to get into that device, it tries the credential that worked last time first. I wish I could do that!

This simple approach has been working great in Discovery for a long time — but recently a couple of folks independently suggested an improvement: some way to let them tell Discovery what order to try the credentials in. There are two situations I've run into where this might help:

  • Lots of credentials, with some more common than others. For example, if you had 150 SSH credentials, but 5 of them covered 90% of your systems. In this case, trying those 5 common credentials first will save time and reduce network chatter in the initial discoveries (after the first discovery, the system will know which credential to try first next time).
  • Some systems with aggressive login security. For example, you might have a group of Solaris database servers that will only allow three login attempts with bad credentials before they lock out the client (e.g., the MID server). To handle this scenario, you could assign special credentials to those systems (if they're not already), and tell Discovery to try those credentials first. Problem solved.

So we've added an order field to the credentials table; this new field appears by default on the list and form views of that table. We've also modified the MID server to use this new field to determine the order that it will try credentials in. By default, this field has a value of 100. To force a credential to be tried earlier, just give it a smaller value for order. To force a credential to be tried later, give it a larger value. If you have multiple credentials with the same value, that's ok, but those credentials won't be tried in any particular order...