Skip to content

Commit

Permalink
Merge pull request OpenTSDB#320 from phil-arista/fix-dedup-eos-agent
Browse files Browse the repository at this point in the history
EOS tcollector agent improvements
  • Loading branch information
tsuna committed May 25, 2016
2 parents 303ba46 + b924cb4 commit d92ae98
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions eos/tcollector_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,11 @@ def start(self):
"--host", self._get_tsd_host(),
"--port", str(self._get_tsd_port()),
"--collector-dir=/usr/local/tcollector/collectors"]

if self.get_agent_mgr().agent_option("dedup-interval"):
args.append("--dedup-interval=%s" %
self.get_agent_mgr().agent_option("dedup-interval"))

tcollector.socket.socket = self._socket_at
debug("Starting tcollector", args)
options, args = tcollector.parse_cmdline(args)
Expand All @@ -260,8 +265,6 @@ def start(self):
kwargs["http_username"] = self.get_agent_mgr().agent_option("username")
if self.get_agent_mgr().agent_option("password"):
kwargs["http_password"] = self.get_agent_mgr().agent_option("password")
if self.get_agent_mgr().agent_option("dedupinterval"):
kwargs["dedupinterval"] = self.get_agent_mgr().agent_option("dedupinterval")
sender = tcollector.SenderThread(reader,
options.dryrun,
hosts,
Expand Down
3 changes: 2 additions & 1 deletion rpm/tcollector.spec
Original file line number Diff line number Diff line change
Expand Up @@ -152,5 +152,6 @@ if [ $1 -eq 0 ] ; then
rm -f %{tcollectordir}/collectors/0/agentcpu.sh
rm -f %{tcollectordir}/collectors/0/agentmem.sh
rm -f %{tcollectordir}/collectors/0/eos.py
rm -f %{py2_sitelib}/tcollector_agent.py
rm -f %{py2_sitelib}/tcollector_agent.py*

fi

0 comments on commit d92ae98

Please sign in to comment.