Problem creating user

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
judge01
Posts: 33
Joined: Sun Dec 04, 2016 9:16 pm

Problem creating user

Post by judge01 »

can anybody help on the problem i have when creating user in Nagios Log Server?

after i have entered all the information needed and click on the create user button it says Could not create the user. I have ensured that i entered all the starred fields as required but it still says that it cannot create the user. I also cant see the user in the user list, but what is weird is that in the audit log log it says that the user was created successfully.

do you have any idea on how to check and resolve this?

thanks in advance.
Last edited by dwhitfield on Mon Apr 24, 2017 8:12 am, edited 1 time in total.
Reason: Marking with green check mark
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Problem creating user

Post by mcapra »

Can you tell me the username of the user you are trying to create?

Can you also PM me the output of these commands:

Code: Select all

curl -XGET 'http://localhost:9200/nagioslogserver/user/_search?size=1000'
curl -XGET 'http://localhost:9200/nagioslogserver/'
I would highly recommend PMing the output and not posting it publicly.
Former Nagios employee
https://www.mcapra.com/
judge01
Posts: 33
Joined: Sun Dec 04, 2016 9:16 pm

Re: Problem creating user

Post by judge01 »

PM sent.

Thanks.

Mod Edit: Files received and shared with technicians.
User avatar
tacolover101
Posts: 432
Joined: Mon Apr 10, 2017 11:55 am

Re: Problem creating user

Post by tacolover101 »

i have seen this due to special characters / symbols being in one of the fields before. try simple strings and see if that works, if so that's probably the issue.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Problem creating user

Post by dwhitfield »

@judge01, did the suggestion about special characters turn up anything for you?
judge01
Posts: 33
Joined: Sun Dec 04, 2016 9:16 pm

Re: Problem creating user

Post by judge01 »

I also know of that but this one is different as the user i was trying to create does not have any special characters and is just a simple string. whats more weird is that when i used the nagiosadmin account, the same user is created. the user i was using previously has administrator rights. it was working before until this problem. i have sent the log files to mcapra as instructed.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Problem creating user

Post by mcapra »

Here's the problem:

Code: Select all

"created_by": {
						"type": "long"
					}
When a user gets created, they need to have a "created_by" value to indicate which user "created" the new user. I'm guessing you aren't using the nagiosadmin account to create these users?

Because the nagiosadmin account is a special snowflake; It's ID is 1, so when a user is created it's created_by value is 1.

But what if we were using the someotheruser account who's ID is AVm6v2DqvmduUnUik-Um? Well, that's definitely not a long, and therefore can't be inserted as the "created_by" value. This is the heart of the problem, and will be fixed in a future version of Nagios Log Server. It doesn't happen on *every* installation, but it happens on a few.

This is a known issue, and is slated to be fixed in a future version of Nagios Log Server. The current fix is to create users using the nagiosadmin account.
Former Nagios employee
https://www.mcapra.com/
judge01
Posts: 33
Joined: Sun Dec 04, 2016 9:16 pm

Re: Problem creating user

Post by judge01 »

thank you for clarifying that.
kindly mark this issue as solved.
Locked