Page 1 of 3
5.3.0 Upgrade
Posted: Wed Oct 19, 2016 10:57 am
by brettmlawrence
I have a small group of Services that are failing with an "UNKNOWN: Invalid characters in the username." error after upgrading. For these I am using a Macro defined in the resource.cfg file. These worked with 5.2.9 that I just came from.
Re: 5.3.0 Upgrade
Posted: Wed Oct 19, 2016 1:14 pm
by dwhitfield
Is one of those services MS SQL? Are you using single quotes around your users?
If the answer to both of those is yes, then move to double quotes. I'm not sure why this would have changed, but there you go. Let us know how it goes.
Otherwise (or if the change fails), could you upload your /usr/local/nagios/etc/nagios.cfg? Thanks!
Re: 5.3.0 Upgrade
Posted: Wed Oct 19, 2016 1:18 pm
by brettmlawrence
Sorry yes they are MSSQL services. They never had any quote around the username.. just the password.. I changed it to double quotes and I am getting the same error.. Config file to follow.
Re: 5.3.0 Upgrade
Posted: Wed Oct 19, 2016 1:26 pm
by brettmlawrence
Nagios.cfg file.
Re: 5.3.0 Upgrade
Posted: Wed Oct 19, 2016 2:42 pm
by avandemore
XI 5.3.1 was released today as an FYI. I have no reason to believe that would solve your issue but it does have other fixes.
Can you PM me or another mod a profile from your system? Admin > System Profile > Download Profile
This will provide us with more detailed information on your configuration.
Re: 5.3.0 Upgrade
Posted: Thu Oct 20, 2016 6:43 am
by brettmlawrence
Sent to you. I am installing 5.3.1 right now as well.
Re: 5.3.0 Upgrade
Posted: Thu Oct 20, 2016 10:03 am
by rkennedy
Could you also provide the name of a couple of hosts + services that are reporting the 'Invalid characters in the username' part? I'd like to see what the check_command is set up with, and how the command is defined as well.
Re: 5.3.0 Upgrade
Posted: Thu Oct 20, 2016 10:09 am
by brettmlawrence
check_xi_mssql_query! --username $USER2$ --password "$USER3$" --database HDMHUP_SHADOW --port 1433 --query "SELECT+CASE+WHEN+%28SELECT+COUNT%28%2A%29+FROM+HDMHUP_SHADOW.sys.all_objects+WHERE+name+%3D+%27LU_ADMIT_TYPE%27%29+%3D+1+THEN+%27GOOD%27+ELSE+%27BAD%27+END" --result "GOOD" --decode --result GOOD!!!!!!!
Re: 5.3.0 Upgrade
Posted: Thu Oct 20, 2016 10:16 am
by avandemore
brettmlawrence,
I have received the profile, and I noticed a couple things. You have one service cfg lasted modified yesterday at 1:21 CST and is the most recently edited file in the directory. This is the failing one. Do you have the previous version the file? In the file, one line contains single quotes around the $USER2$ macros, and the remaining queries using $USER2$ do not. There is also a tmp file from a modified resource.cfg near the time of the aforementioned edit. Did you have that file opened in a editor when you created the profile?
Also please see the last post of this thread including the restart of nagios bit.
How to escape $ and ! in password?
Re: 5.3.0 Upgrade
Posted: Thu Oct 20, 2016 11:49 am
by brettmlawrence
I did have it open. Many of them have erred. All using the same user and password. I put the double quotes around the user and password that have the special characters and I am still getting the error. I did have the file open when I downloaded the profile. I added the single quotes, and double quotes as trial and error trying to get this issue resolved. My concern is this worked before the upgrade, I am just confused what has changed.