danifr / internet-pi

Raspberry Pi config for all things Internet.
MIT License
3 stars 0 forks source link

Raspberry Pi Monitoring dashboard not added to Grafana #1

Closed danifr closed 3 years ago

danifr commented 3 years ago

Original message: https://github.com/geerlingguy/internet-pi/issues/226#issuecomment-922542108

@jimkuk, please make sure you follow this steps:

git clone https://github.com/danifr/internet-pi.git ~/internet-pi-danifr
cd ~/internet-pi-danifr
cp /path/to/original/internet-pi/config.yml ~/internet-pi-danifr/config.yml # copy your config.yml from the original internet-pi directory to internet-pi-danifr
ansible-playbook main.yml # run the playbook again

Let me know if you can see the dashboard after running those commands :)

jimcuk commented 3 years ago

ran the commands - not seeing the Dashboard?

danifr commented 3 years ago

OK, what do you see if you click on Search and then General? Do you see the Rasbperry Pi Monitoring dashboard there?

image

Btw I just pushed a new fix to my branch, you might want to run:

cd ~/internet-pi-danifr
git pull --rebase origin rpi_monitoring
ansible-playbook main.yml
jimcuk commented 3 years ago

Just the internet connection

image

jimcuk commented 3 years ago

getting this with the new fix image

jimcuk commented 3 years ago

ok didnt realise I had another inventory file to edit, I have done that and now get as far as

image

danifr commented 3 years ago

Ah good, that looks way better. Please manually create /home/pi/raspberry-monitoring and run the ansible playbook again:

mkdir /home/pi/raspberry-monitoring
ansible-playbook main.yml

I will add some ansible code to automatically create the directory in my next commit.

jimcuk commented 3 years ago

image

jimcuk commented 3 years ago

would I be right in thinking it is the init file that is missing ? image

danifr commented 3 years ago

Weird, I cannot reproduce your issue on my system. Let's do something, change the variable config_dir in the config.yaml to something like: /tmp/new_directory. Then run ansible again.

If it fails, can you please paste the error message and your config.yaml?

jimcuk commented 3 years ago

image

image

danifr commented 3 years ago

Please read the error message, you added an unnecessary extra line in your config.yml file (line 3)

try with: config_dir: '/tmp/new_directory'

(everything that starts with a # is commented out)

jimcuk commented 3 years ago

yeah sorry dont know what I was thinking there. made the correction but still getting the error below image

danifr commented 3 years ago

Np!

I wonder if there is a permission issue related to your user... anyway, let's create those directories manually.

mkdir /tmp/new_directory/raspberry-monitoring/data
mkdir /tmp/new_directory/raspberry-monitoring/init

Then run the ansible playbook again.

jimcuk commented 3 years ago

Ok I had just created the init directory before you posted and now have the monitoring appear in grafana without data - guessing the data directory will solve that - off to check

jimcuk commented 3 years ago

yip that is it up and running. Great stuff. Many thanks for your tima and patience Daniel

danifr commented 3 years ago

No problem! Happy it is finally working! In the coming days, I will add some ansible code to make sure those 2 directories exist. Thanks to you for all your tests!

jimcuk commented 2 years ago

Hi danifr what steps would be necessary to add another pi to the grafana monitoring?