$ ls Procfile bin hubot-scripts.json package.json README.md external-scripts.json node_modules scripts
こんなエラーが出たときは
/root/.config へのアクセス権限がないと言われています。
1 2 3 4 5 6 7 8 9 10 11
Error: EACCES, permission denied '/root/.config' at Object.fs.mkdirSync (fs.js:654:18) at sync (/usr/lib/node_modules/yo/node_modules/configstore/node_modules/mkdirp/index.js:71:13) at Function.sync (/usr/lib/node_modules/yo/node_modules/configstore/node_modules/mkdirp/index.js:77:24) at Object.create.all.get (/usr/lib/node_modules/yo/node_modules/configstore/index.js:38:13) at Object.Configstore (/usr/lib/node_modules/yo/node_modules/configstore/index.js:27:44) at new Insight (/usr/lib/node_modules/yo/node_modules/insight/lib/index.js:37:34) at Object.<anonymous> (/usr/lib/node_modules/yo/lib/cli.js:156:11) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32)
# Description: # hubot basic command. # # Commands: # hubot who are you - I'm hubot! # hubot hello # hubot who am I - You are <user_name> # hubot what is this <*> - This is <$1>
robot.respond /who am I/i, (msg) -> msg.send "You are #{msg.message.user.name}"
robot.respond /what is this (.*)/i, (msg) -> msg.send "This is #{msg.match[1]}"
run hubot
sudo is required and in order to access http port. You will require hubot integrated with outside site - ex) JIRA etc…
1 2 3 4 5
$ sudo bin/hubot -a slack
[Wed Jan 13 2016 13:43:08 GMT+0900 (JST)] INFO Connecting... [Wed Jan 13 2016 13:43:10 GMT+0900 (JST)] INFO Logged in as hubot of RUBY GROUPE, but not yet connected [Wed Jan 13 2016 13:43:11 GMT+0900 (JST)] INFO Slack client now connected
no sudo execution result …(>_<) Error occured!!
1 2 3 4 5 6 7 8 9 10 11 12 13
$ bin/hubot -a slack
[Wed Jan 13 2016 16:40:59 GMT+0900 (JST)] INFO Connecting... [Wed Jan 13 2016 16:40:59 GMT+0900 (JST)] ERROR Error: listen EACCES at errnoException (net.js:905:11) at Server._listen2 (net.js:1024:19) at listen (net.js:1065:10) at net.js:1147:9 at dns.js:72:18 at process._tickCallback (node.js:442:13)
[Wed Jan 13 2016 16:41:00 GMT+0900 (JST)] INFO Logged in as hubot of RUBY GROUPE, but not yet connected [Wed Jan 13 2016 16:41:02 GMT+0900 (JST)] INFO Slack client now connected
$ sudo curl -L http://toolbelt.treasuredata.com/sh/install-redhat-td-agent2.sh | sh
起動/サービス登録
1 2
$ sudo systemctl start td-agent $ sudo chkconfig td-agent on
systemctl enableするとchkconfig使ってと怒られます。
1 2 3 4 5 6 7 8 9 10 11 12 13 14
$ sudo systemctl enable td-agent
td-agent.service is not a native service, redirecting to /sbin/chkconfig. Executing /sbin/chkconfig td-agent on The unit files have no [Install] section. They are not meant to be enabled using systemctl. Possible reasons for having this kind of units are: 1) A unit may be statically enabled by being symlinked from another unit's .wants/ or .requires/ directory. 2) A unit's purpose may be to act as a helper for some other unit which has a requirement dependency on it. 3) A unit may be started when needed via activation (socket, path, timer, D-Bus, udev, scripted systemctl call, ...). [root@ip-172-31-19-253 log]#
# HTTP input # POST http://localhost:8888/<tag>?json=<json> # POST http://localhost:8888/td.myapp.login?json={"user"%3A"me"} # @see http://docs.fluentd.org/articles/in_http <source> type http port 8888 </source>
## live debugging agent <source> type debug_agent bind 127.0.0.1 port 24230 </source>
以下のようにコマンドを実行してtd-agent.logを確認してみる。
1 2 3 4 5
$ curl -X POST -d 'json={"json":"TEST!!"}' http://localhost:8888/debug.test