Problem with geolocation
Hi everyone,
Been using for some time Observium as a potential replacement for our reporting system and we are now ready to put in production our server but I'm stuck at the moment. I know some people had this issue in the past and some fix were put in place but it doesn't work for me.
On a newly installed server, when I try to add a host by addhost.php, the mysql insert query is not going through because the location_geoapi is empty. The easiest way of dealing would be to just allow null value or put a default value, but I would like to have a clean solution as we will use it for production. I don't know if there is something missing in my setup or what, but something I'm sure, the request to get the geo location doesn't go out as I don't see anything on my proxy.
So, can someone can help me here? I can provide some debugging if you need more information.
Fantastic product by the way, loving it.
Thank you
Joniel Gagné-Laurin Administrateur Infrastructure - Infrastructure Administrator Square-Enix Europe t. 514-670-6310 / c. 514-209-7924
______________________________________________________________________ This email has been scanned by the MessageLabs ______________________________________________________________________
Hi everyone,
After more investigation on my side, I might have found the issue: there is no retrieval of the geolocation at the creation of a host, so as the DB require the value not to be empty, it rejects it.
So I resort to change the DB structure to make geolocation allow null. Hope this help you.
Cheers
Joniel Gagné-Laurin Administrateur Infrastructure - Infrastructure Administrator Square-Enix Europe t. 514-670-6310 / c. 514-209-7924
From: observium [mailto:observium-bounces@observium.org] On Behalf Of Joniel Gagné-Laurin Sent: 21 juin 2013 13:49 To: observium@observium.org Subject: [Observium] Problem with geolocation
Hi everyone,
Been using for some time Observium as a potential replacement for our reporting system and we are now ready to put in production our server but I'm stuck at the moment. I know some people had this issue in the past and some fix were put in place but it doesn't work for me.
On a newly installed server, when I try to add a host by addhost.php, the mysql insert query is not going through because the location_geoapi is empty. The easiest way of dealing would be to just allow null value or put a default value, but I would like to have a clean solution as we will use it for production. I don't know if there is something missing in my setup or what, but something I'm sure, the request to get the geo location doesn't go out as I don't see anything on my proxy.
So, can someone can help me here? I can provide some debugging if you need more information.
Fantastic product by the way, loving it.
Thank you
Joniel Gagné-Laurin Administrateur Infrastructure - Infrastructure Administrator Square-Enix Europe t. 514-670-6310 / c. 514-209-7924
______________________________________________________________________ This email has been scanned by the MessageLabs ______________________________________________________________________
______________________________________________________________________ This email has been scanned by the MessageLabs ______________________________________________________________________
______________________________________________________________________ This email has been scanned by the MessageLabs ______________________________________________________________________
Ok, so after some more investigation, here is the real cause of my issues: MySQL InnoDB Strict Mode. For some time, we have been using a Windows installed MySQL server to host the data from Observium and by default, the strict mode is activated in InnoDB. This mode mean that a query that has some information missing or inconsistent variable type will be rejected. In my case, the Insert done to the DB was missing location_geoapi. When the strict mode is not activated, it will put automatically a space or something in the field and accept the query. By turning off strict, it is now working correctly.
So, all good now. Hope this might help someone in the future.
Cheers
Joniel Gagné-Laurin Administrateur Infrastructure - Infrastructure Administrator Square-Enix Europe t. 514-670-6310 / c. 514-209-7924
From: observium [mailto:observium-bounces@observium.org] On Behalf Of Joniel Gagné-Laurin Sent: 25 juin 2013 15:31 To: Observium Network Observation System Subject: Re: [Observium] Problem with geolocation
Hi everyone,
After more investigation on my side, I might have found the issue: there is no retrieval of the geolocation at the creation of a host, so as the DB require the value not to be empty, it rejects it.
So I resort to change the DB structure to make geolocation allow null. Hope this help you.
Cheers
Joniel Gagné-Laurin Administrateur Infrastructure - Infrastructure Administrator Square-Enix Europe t. 514-670-6310 / c. 514-209-7924
From: observium [mailto:observium-bounces@observium.org] On Behalf Of Joniel Gagné-Laurin Sent: 21 juin 2013 13:49 To: observium@observium.orgmailto:observium@observium.org Subject: [Observium] Problem with geolocation
Hi everyone,
Been using for some time Observium as a potential replacement for our reporting system and we are now ready to put in production our server but I'm stuck at the moment. I know some people had this issue in the past and some fix were put in place but it doesn't work for me.
On a newly installed server, when I try to add a host by addhost.php, the mysql insert query is not going through because the location_geoapi is empty. The easiest way of dealing would be to just allow null value or put a default value, but I would like to have a clean solution as we will use it for production. I don't know if there is something missing in my setup or what, but something I'm sure, the request to get the geo location doesn't go out as I don't see anything on my proxy.
So, can someone can help me here? I can provide some debugging if you need more information.
Fantastic product by the way, loving it.
Thank you
Joniel Gagné-Laurin Administrateur Infrastructure - Infrastructure Administrator Square-Enix Europe t. 514-670-6310 / c. 514-209-7924
______________________________________________________________________ This email has been scanned by the MessageLabs ______________________________________________________________________
______________________________________________________________________ This email has been scanned by the MessageLabs ______________________________________________________________________
______________________________________________________________________ This email has been scanned by the MessageLabs ______________________________________________________________________
______________________________________________________________________ This email has been scanned by the MessageLabs ______________________________________________________________________
______________________________________________________________________ This email has been scanned by the MessageLabs ______________________________________________________________________
Hi Joniel,
Thanks for the research; that was an interesting new thing I learned today. ;-)
So actually we should indeed allow NULL on that field, I guess... (but it explains why it's working for (almost?) everyone)
Tom
On 06/26/2013 03:40 PM, Joniel Gagné-Laurin wrote:
Ok, so after some more investigation, here is the real cause of my issues: MySQL InnoDB Strict Mode. For some time, we have been using a Windows installed MySQL server to host the data from Observium and by default, the strict mode is activated in InnoDB. This mode mean that a query that has some information missing or inconsistent variable type will be rejected. In my case, the Insert done to the DB was missing location_geoapi. When the strict mode is not activated, it will put automatically a space or something in the field and accept the query. By turning off strict, it is now working correctly.
So, all good now. Hope this might help someone in the future.
Cheers
Joniel Gagné-Laurin
Administrateur Infrastructure -- Infrastructure Administrator
Square-Enix Europe
t. 514-670-6310 / c. 514-209-7924
*From:*observium [mailto:observium-bounces@observium.org] *On Behalf Of *Joniel Gagné-Laurin *Sent:* 25 juin 2013 15:31 *To:* Observium Network Observation System *Subject:* Re: [Observium] Problem with geolocation
Hi everyone,
After more investigation on my side, I might have found the issue: there is no retrieval of the geolocation at the creation of a host, so as the DB require the value not to be empty, it rejects it.
So I resort to change the DB structure to make geolocation allow null. Hope this help you.
Cheers
Joniel Gagné-Laurin
Administrateur Infrastructure -- Infrastructure Administrator
Square-Enix Europe
t. 514-670-6310 / c. 514-209-7924
*From:*observium [mailto:observium-bounces@observium.org] *On Behalf Of *Joniel Gagné-Laurin *Sent:* 21 juin 2013 13:49 *To:* observium@observium.org mailto:observium@observium.org *Subject:* [Observium] Problem with geolocation
Hi everyone,
Been using for some time Observium as a potential replacement for our reporting system and we are now ready to put in production our server but I'm stuck at the moment. I know some people had this issue in the past and some fix were put in place but it doesn't work for me.
On a newly installed server, when I try to add a host by addhost.php, the mysql insert query is not going through because the location_geoapi is empty. The easiest way of dealing would be to just allow null value or put a default value, but I would like to have a clean solution as we will use it for production. I don't know if there is something missing in my setup or what, but something I'm sure, the request to get the geo location doesn't go out as I don't see anything on my proxy.
So, can someone can help me here? I can provide some debugging if you need more information.
Fantastic product by the way, loving it.
Thank you
Joniel Gagné-Laurin
Administrateur Infrastructure -- Infrastructure Administrator
Square-Enix Europe
t. 514-670-6310 / c. 514-209-7924
This email has been scanned by the MessageLabs ______________________________________________________________________
This email has been scanned by the MessageLabs ______________________________________________________________________
This email has been scanned by the MessageLabs ______________________________________________________________________
This email has been scanned by the MessageLabs ______________________________________________________________________
This email has been scanned by the MessageLabs ______________________________________________________________________
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
participants (2)
-
Joniel Gagné-Laurin
-
Tom Laermans