![]() |
| Pachube |
This blog post is the result of a brief tutorial I made in Google+'s Raspberry Pi community for +Kim Huebel.
Requirements
![]() |
| Raspberry Pi |
- Raspberry Pi connected to the Internet.
- Debian-flavor "ifstat command". Run "ifstat -v"; You should have version 1.1.
- realpath command for setup.sh. Run "realpath --version" to see if you have it installed. Use apt-get or pacman to install it depending on which linux distro you are using.
Create a feed on Pachube
- Create an account on Pachube if you don't have one already and log in with your account.
- Add a new device/feed by clicking on the +Device/Feed button.
- Select "Something else" when prompted for device type.
- Select "No, I will push data to Cosm" when asked for an existing data source.
- Give your device/feed a title. (e.g. raspberry-pi-1)
- Optional: Add tags to your new device. (e.g., raspberry pi, network, performance)
- Click Create.
- Write down the feed ID, as you will need this later for configuring the script.
- Click "Keys" in your console and then click the +Key button to add a new key.
- Label your key. (e.g. raspberry-pi-update)
- Set feed restriction to "Use specific feed(s)" and select the Device/feed you created earlier.
- Only "update" is needed in Access Privileges.
- Click Create.
Download rpi2pachube from Github
- Make a directory where you want rpi2pachube folder to be located. (e.g. ~/scripts).
- mkdir -p ~/scripts
- CD into that directory: (e.g. cd ~/scripts/)
- cd ~/scripts
- Clone the git repository.
- git clone git@github.com:Cameri/rpi2pachube.git
- Run the configuration utility.
- cd rpi2pachube
- ./setup.sh
- When prompted, answer with your Pachube API Key, Feed ID and a Network Interface to monitor.
The configuration utility creates the file ~/.rpi2pachube.conf where your configuration is stored.
It is also possible to manually create a global configuration file in /etc/rpi2pachube.conf but that is unnecessary and not recommended.
Run the configuration utility (setup.sh) instead of manually editing ~/.rpi2pachube.conf.
Your Raspberry Pi performance values will be pushed to Pachube every 5 minutes. To change it, edit your user's crontab file (e.g. crontab -e).
That is all! Feel free to leave a comment.
Links:
Official Google+ Post in the Raspberry Pi community.
Update (Wed, Jan 23rd, 2013): Added "realpath" as a requirement. Renamed script to rpi2pachube and moved repository to a new location.
Legal disclaimer: All mentions of the letter sequence "cosm" on this post or Github repository (or in combination with other letters, or any other representation) refer ONLY to the on-line database service called Pachube and NOT to Cosm®, a trademark that is registered to Mithral Inc.
That is all! Feel free to leave a comment.
Links:
Official Google+ Post in the Raspberry Pi community.
Update (Wed, Jan 23rd, 2013): Added "realpath" as a requirement. Renamed script to rpi2pachube and moved repository to a new location.
Legal disclaimer: All mentions of the letter sequence "cosm" on this post or Github repository (or in combination with other letters, or any other representation) refer ONLY to the on-line database service called Pachube and NOT to Cosm®, a trademark that is registered to Mithral Inc.


