Bug #49699 Agent will not report OS information if there is a '.' in "agent-host-id"
Submitted: 14 Dec 2009 22:01 Modified: 30 Apr 2010 10:55
Reporter: Chris Calender Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Agent Severity:S3 (Non-critical)
Version:2.0.5.7153, 2.1.0.1093 OS:Any
Assigned to: Jan Kneschke CPU Architecture:Any
Tags: agent-host-id, cpu graph empty, no os stats

[14 Dec 2009 22:01] Chris Calender
Description:
If you have a period "." in the agent-host-id (setting in in one's mysql-monitor-agent.ini), then the agent will not be able to gather OS stats, and the OS graphs (such as CPU graph) will be empty.

How to repeat:
1. Set the following in your agent config file:

agent-host-id = chris.com

2. Truncate the existing mysql.inventory table.

truncate table mysql.inventory;

3. Restart your agent.

4. Look at your CPU graph, or any other OS graph.

Suggested fix:
If you look in the agent debug log, you'll see some places where the agent-host-id (chris.com) is quoted in some places, and not quoted in others.  Perhaps this is related.

Oldag mentioned the following line as perhaps the culprit in the server:

g_string_assign_len(instance->parent_instance, S(m->agent_host_id)); /* the agent's host-id */
[17 Dec 2009 7:38] Enterprise Tools JIRA Robot
Michael Schuster writes: 
short summary of long discussion on IRC with Darren Oldag: we should probably get rid of host-id quoting all together; any level of quoting is confusing to the service manager.
[18 Dec 2009 19:56] Enterprise Tools JIRA Robot
Keith Russell writes: 
Patch installed in versions => 2.1.1.1132.
[28 Apr 2010 15:44] Enterprise Tools JIRA Robot
Carsten Segieth writes: 
forgot in last comment: checked OK in 2.1.1.1144
[28 Apr 2010 18:38] Enterprise Tools JIRA Robot
Jan Kneschke writes: 
revno: 1831
fixes bug(s): http://bugs.mysql.com/49699
committer: jan@mysql.com
branch nick: trunk
timestamp: Wed 2010-04-28 20:06:40 +0200
message:
    merged revno 1530 + 1531 from rel-2.1 over by hand:
  
     * do not quote instance names even if they contain a '.' character. quoting will mess up scheduling and finding the instance again (fixes #49699/EM-3865)
       * remove code that checks if instance names need to be quoted (some unused code is still left).
       * change instance name matching in quan.lua to allow for '.' chars in database names, make the rest of the matching a bit stricter to allow for unquoted '.' chars
     * replace exception messages with something useful (no more "Hmm, something wasn't ok").
[28 Apr 2010 23:22] Enterprise Tools JIRA Robot
Keith Russell writes: 
Patch installed in versions => 2.2.0.1705.
[29 Apr 2010 12:12] Enterprise Tools JIRA Robot
Carsten Segieth writes: 
tested OK in 2.2.0.1705
[30 Apr 2010 10:55] MC Brown
A note has been added to the 2.2.0 changelog: 

        If the <literal>agent-host-id</literal> value contained a period, information would fail to be reported to &merlin_server;.