After configuring this blog I wanted to find out how to run some analytics on it before I started actually writing anything on it. Naturally, I'm using Splunk.

Since Ghost runs on a different port, it handles its own requests and isn't monitored by apache, which runs my site. In order to get the logs from ghost, I needed to pipe the results of the process to a file. Normally Ghost outputs the requests for resources (e.g. this page, an image) to standard output. Editing /etc/rc.local on my Ubuntu 14 AWS server to this is what I decided on.

cd /var/www/ghost/
sudo npm start --production | cat > access.log &
exit 0

Now, all the access requests to this blog get logged to a file and I can monitor this file from Splunk. Then I'll be able to make visualizations like the one below with data that is seperate from my website, only for this blog.

The viz below is showing where people are accessing my website from, colored by city.

To generate the above, one search creates the report in Splunk:

sourcetype=access_combined OR index=ghost_access 
| iplocation clientip 
| geostats count by City

As for the title of this post:

亡霊 = "perished soul" = ghost

情報処理 = "information/data processing"