Clarification on number of $USERn$ variables supported

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
SoulA
Posts: 19
Joined: Mon Oct 10, 2011 9:47 am

Clarification on number of $USERn$ variables supported

Post by SoulA »

The documentation is a bit misleading saying that 256 are supported but the example only says that 32 are. I did find this bug that says it should be changed.

http://nagios.sourceforge.net/docs/nagi ... .html#user
http://tracker.nagios.org/view.php?id=242

The example resource.cfg only talks about 32 as well:

http://sourceforge.net/p/nagios/nagiosc ... rce.cfg.in

Can someone confirm what the actual number is in the 3.x versions of Nagios and maybe update everything to reflect the correct number.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Clarification on number of $USERn$ variables supported

Post by abrist »

256 is correct. I made those changes to the docs, I must have missed a few entries. If you could open a new ticket on the tracker, noting where the 32 value still exists, I will get it fixed up.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
SoulA
Posts: 19
Joined: Mon Oct 10, 2011 9:47 am

Re: Clarification on number of $USERn$ variables supported

Post by SoulA »

Here is the newly created issue:

http://tracker.nagios.org/view.php?id=557

Also, I'm guessing that this number can be changed by altering some hard coded value in the Nagios code somewhere and recompiling. Is that assumption correct? If so any ideas where that value might be?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Clarification on number of $USERn$ variables supported

Post by abrist »

It may be a bit more complicated depending on how the memory allocation in core is coded.
SoulA wrote:If so any ideas where that value might be?
This would be a question for one or our core devs. I will email Eric a link to this thread and see if we can get his input.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Clarification on number of $USERn$ variables supported

Post by abrist »

I just heard back from Eric - "It is the MAX_USER_MACROS macro in include/macros.h."
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked