servicedisplayname field size 64 characters
servicedisplayname field size 64 characters
Dear Expert
We have added display_name (SERVICEDISPLAYNAME) whatever so called and working fine as expected but there is little issue, while configuring the HOST/SERVICE, there big room to enter 100 or more characters, however while get display in NOCSCREEN its showing only 64 characters.
Looks there is variable length 64 characters in database.
Can you please let us know which database, table, field have to increase field length and is it safe to change like that? Is there any bad impact to modify table?
Regards
We have added display_name (SERVICEDISPLAYNAME) whatever so called and working fine as expected but there is little issue, while configuring the HOST/SERVICE, there big room to enter 100 or more characters, however while get display in NOCSCREEN its showing only 64 characters.
Looks there is variable length 64 characters in database.
Can you please let us know which database, table, field have to increase field length and is it safe to change like that? Is there any bad impact to modify table?
Regards
Zajil NMS
Re: servicedisplayname field size 64 characters
The following command will increase that database field size to 128:
http://stackoverflow.com/questions/1279 ... ysql-table
Just make sure the -pnagiosxi has the right password, but it should be the same if you have not modified it. There shouldn't be any huge performance hits by doing this since your display names should all be under 64 at the moment anyway.
Code: Select all
echo "use nagios; ALTER TABLE nagios_services MODIFY display_name VARCHAR(128);" | mysql -u root -pnagiosxi
Just make sure the -pnagiosxi has the right password, but it should be the same if you have not modified it. There shouldn't be any huge performance hits by doing this since your display names should all be under 64 at the moment anyway.
Former Nagios employee
Re: servicedisplayname field size 64 characters
Dear tmcdonald
I did and found little change before and after
I changed in both tables, nagios_hosts , nagios_services ... result is expected showing full DISPLAYNAME more than 100 characters in Host & Services.
Just please clear my doubt as above , Null Yes, Default NULL , little change, any inverse effect?
Regards
I did and found little change before and after
Code: Select all
| Field | Type | Null | Key | Default | Extra |
| display_name | varchar(64) | NO | | | |
| display_name | varchar(128) | YES | | NULL | |
Just please clear my doubt as above , Null Yes, Default NULL , little change, any inverse effect?
Regards
Zajil NMS
Re: servicedisplayname field size 64 characters
This will only affect the hosts/services going forward. Previously since the limit was 64, anything longer than that would be cut off and would not become available simply by increasing the column width.
Go to the Core Config Manager and find one of the hosts that needs to have a display name longer than 64 characters, write out the full name, then save and apply config. Then see if the name increases or not in the NOC screen.
Go to the Core Config Manager and find one of the hosts that needs to have a display name longer than 64 characters, write out the full name, then save and apply config. Then see if the name increases or not in the NOC screen.
Former Nagios employee
Re: servicedisplayname field size 64 characters
Dear tmcdonald
I think you read my previous post in hurry....no issue....I will explain again.
As I told, its okay, done good, result is as expected, giving full display name, more than 100 characters.
Plz see the change in field properties. Can you clear my doubt that field property has been changed, before changes, Null was NO , Default was Blank........after the changes field properties changed, NULL=YES, DEFAULT=NULL
(will it effect in future? or there will be no issue)? I want to clarify that.....
Regards
I think you read my previous post in hurry....no issue....I will explain again.
As I told, its okay, done good, result is as expected, giving full display name, more than 100 characters.
Plz see the change in field properties. Can you clear my doubt that field property has been changed, before changes, Null was NO , Default was Blank........after the changes field properties changed, NULL=YES, DEFAULT=NULL
(will it effect in future? or there will be no issue)? I want to clarify that.....
Regards
Zajil NMS
Re: servicedisplayname field size 64 characters
or while applying command I should add the properties too.... NULL=NO , Default=Blank (but I don't know how to change in single command what you suggested).
Regards
Regards
Zajil NMS
Re: servicedisplayname field size 64 characters
In theory it should not make a difference since we never leave those fields blank anyway, which means they should never get a chance to be null.
However if you want it to match perfectly you can run this:
However if you want it to match perfectly you can run this:
Code: Select all
echo "use nagios; ALTER TABLE nagios_services MODIFY display_name VARCHAR(128) NOT NULL DEFAULT '';" | mysql -u root -pnagiosxi
Former Nagios employee
Re: servicedisplayname field size 64 characters
Dear tmcdonald
Sorry to bother you, when there will be new version (new nagios release, next year), will shrink back this field from 128 to 64?
Regards
Sorry to bother you, when there will be new version (new nagios release, next year), will shrink back this field from 128 to 64?
Regards
Zajil NMS
Re: servicedisplayname field size 64 characters
Looking at the current upgrade script, it does not look like we modify the database in that way, but I cannot say for sure whether this will be the case in the future. However, my guess is this will not be modified as there is not a great reason currently to do so. If anything, it would be increased to accommodate situations like this.
Former Nagios employee
Re: servicedisplayname field size 64 characters
Dear tmcdonald
Thanks for your guide.....its done.
FYI, the DISPLAY_NAME is very crucial to us, without it we cannot survive. Recently we did some little changes (ajaxhelpers-servicestatus.inc.php) and able to search on DISPLAY_NAME , we all NMS team delighted. You should incorporate everywhere as a basic field.
Me still missing this DISPLAY_NAME on the Title of MRTG Graph (PNP) , hope you will work on it to incorporate or will guide me how to do.
** PLEASE CLOSE THIS CASE **
Regards
Thanks for your guide.....its done.
FYI, the DISPLAY_NAME is very crucial to us, without it we cannot survive. Recently we did some little changes (ajaxhelpers-servicestatus.inc.php) and able to search on DISPLAY_NAME , we all NMS team delighted. You should incorporate everywhere as a basic field.
Me still missing this DISPLAY_NAME on the Title of MRTG Graph (PNP) , hope you will work on it to incorporate or will guide me how to do.
** PLEASE CLOSE THIS CASE **
Regards
Zajil NMS