Aurelien Bompard via FreeIPA-users wrote:
> Hey folks!
> 
> On Fedora we have reached the limit of our ID ranges again. I've added a 
> fourth additional ID range, but I wonder if there would be a way for us to 
> monitor ID range usage in Nagios / Zabbix, so that we anticipate it next time 
> rather than having users failing to create a new account.

If your IPA range is also a DNA range then you can query
dnaRemainingValues from the entry in cn=dna,cn=ipa,cn=etc,$SUFFIX.

> I'd like to get the number of free IDs, is there something like this in IPA 
> already? I see that there are some interesting functions in 
> ipaserver/install/ipa_idrange_fix.py, should I try to write a script using 
> them, or on the contrary avoid using them if they are private?

I think if folks wanted to use a class or method here we'd probably want
to stick it into a library instead. That said, it would probably work
but there'd be no guarantees.

Still, I'm not sure this will look for the "last id allocated in a
range" which is what you need. And for that you'd probably need a pretty
broad query to find it. I could see it being a sizable load over time.

The tool gets away with its queries since it is intended to be a one-off
(or several) and not a run 20x per day so efficiency wasn't a primary
concern.

rob

-- 
_______________________________________________
FreeIPA-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedorahosted.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to