VMware Cloud Community
misterbizarro
Contributor
Contributor

changing the agent log file path and data dir to hostname variable

i am running my agent off of nfs and need to change the path of the log file dir and data dir to the hostname.

i tried the following convention but it just creates a path using the literal string and doesn't evaluate the expression. is there a way to do this? I wasn't able to locate it in the documentation:

agent.logDir=/nfs/logfiles/hyperic/agent/${agent.setup.agentIP}
agent.dataDir=/nfs/data/hyperic/agent/${agent.setup.agentIP}
Reply
0 Kudos
2 Replies
ama_hyperic
Hot Shot
Hot Shot

Are you doing this to save disk space or for automation to blow out the agent to a large number of machines?

If for disk space, create a .hq directory and agent.properties in the user home of whoevers going to run the agent.
~/.hq/agent.properties

agent.logDir=~/hyperic/agent/logs/
agent.dataDir=~/hyperic/agent/data/
agent.tmpDir=~/hyperic/agent/tmp/

Note that this is not in the documentation as it hasnt been tested by Hyperic QA yet so its officially "unsupported".

Also, you'll probably triple youre network I/O doing things with what you have below just on metric data alone. Not to mention the agents write a pretty generous log file.

let me know what you think.
Reply
0 Kudos
misterbizarro
Contributor
Contributor

I am trying to achieve each host has a unique log directory on a shared mount.

I don't see anywhere in the docs that will allow a variable for the hostname to be placed in the datadir and logdir properties.
Reply
0 Kudos