Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data too long for column #62

Open
gahujipo opened this issue Jan 18, 2021 · 1 comment
Open

Data too long for column #62

gahujipo opened this issue Jan 18, 2021 · 1 comment

Comments

@gahujipo
Copy link

We experience from time to time messages like the following in our logs:

ndo2db[538624]: mysql_error: 'Data too long for column 'xxx' at row 1'

Are there plans to implement some logic that is capable to truncate data in text based columns? Because otherwise data gets not inserted in the database, because the query fails.

@sawolf
Copy link
Contributor

sawolf commented Jan 19, 2021

Hi @gahujipo,

First, to resolve your issue, there are two options:

  1. You can modify the schema to fit your individual data better. The schema that we provide in ndoutils is usually a sensible default for most users, but in some cases (long identifiers for hosts/services, very long check output, etc) some queries will fail. So if you want the correct data to always show up in the database, you can just widen the columns which give this error. Widening all columns in this manner may impact performance.

  2. Your other option is to disable STRICT_TRANS_TABLES in /etc/my.cnf or wherever you keep your main MySQL configuration. This will implement the truncation logic you mentioned, without any changes to this project.

As a side note, this project is no longer being maintained. For Nagios XI customers, we've rewritten this project as NDO 3.x, which is currently closed-source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants