Page 1 of 1

Host names with @ character

Posted: Fri Mar 06, 2020 4:43 am
by solarmon
Hi,

I would like to monitor 'virtual' instance on a particular host. This uses SNMP v3 and you specify a context name for the 'virtual' instance you want to query.

I would like use the "@" (ampersand) character in the hostname to represent the virtual instance on that host - much like an email address:

[email protected]

I seem to be able to create this host and services in Nagios XI (5.6.8) and the service checks return OK with status and value.

However, when trying to view the performance graph for the host or services, this is not available. For the host, the graph shows as empty with "No data to display" message. For the services, there no graph available, but the following message is displayed:

Code: Select all

No performance graphs were found for this service. If you have just started monitoring this object then it may take up to 15 minutes for the performance graphs to appear.
I have another hosts configured in a similar way, but without the "@" character (I have used a "." (dot) instead) and this is working and graphs are available and working fine.

I have tried deleting the .RRD file for these services graphs, but that does not make a differrence.

Is a "@" (ampersand) character valid in a host name?

Thank you.

Re: Host names with @ character

Posted: Fri Mar 06, 2020 9:33 am
by solarmon
When I change the host name to use a "." instead of "@", the graphs start working.

So I'm assuming "@" is not allowed. Where can I get a list of disallowed characters for host and service names?

Re: Host names with @ character

Posted: Fri Mar 06, 2020 3:29 pm
by benjaminsmith
Hi@solarmon,

There's a directive in the main nagios.cfg file with a listing of what characters cannot be used for object names as well ( in addition to the @ character).

Code: Select all

illegal_object_name_chars=`~!$%^&*|'"<>?,()=
See: Nagios XI - Special Characters