Give room_type and room_id to node_exporter
parent
591a33f96e
commit
b3490f14d7
|
@ -1,9 +1,11 @@
|
|||
|
||||
# fossasia-video
|
||||
|
||||
The FOSSASIA video recording setup
|
||||
The experimental FOSSASIA video recording setup
|
||||
|
||||
Looking for the [video recorder's guide](https://docs.google.com/document/d/1LWKt0kXWGVuPHCLvBBH35frJFtfhQuNIZ7DSS2HNLZI/edit?usp=sharing)?
|
||||
Looking for the [video recorder's guide](https://docs.google.com/document/d/1LWKt0kXWGVuPHCLvBBH35frJFtfhQuNIZ7DSS2HNLZI/edit)?
|
||||
|
||||
There is also the [video equipment sheet](https://docs.google.com/spreadsheets/d/1XLckJRG4ng2NoOfqy-EKca2LJdfC-Z6zfE6Q3FqKoM0/edit)
|
||||
|
||||
## Overview
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
[recorders]
|
||||
x220-01 ansible_host=fd11:f055:a514::2 ansible_user=opentech room_id= room_type=setup2
|
||||
x230-01 ansible_host=fd11:f055:a514::3 ansible_user=opentech room_id=EH2-1 room_type=setup1
|
||||
x240-01 ansible_host=fd11:f055:a514::4 ansible_user=opentech room_id= room_type=setup3
|
||||
x240-02 ansible_host=fd11:f055:a514::5 ansible_user=opentech room_id= room_type=setup3
|
||||
x240-03 ansible_host=fd11:f055:a514::6 ansible_user=opentech room_id= room_type=setup3
|
||||
x220-01 ansible_host=fd11:f055:a514::2 ansible_user=opentech room_type=setup2 room_id= webcam_name=usb-046d_HD_Pro_Webcam_C920_CEB3336F
|
||||
x230-01 ansible_host=fd11:f055:a514::3 ansible_user=opentech room_type= room_id= webcam_name=usb-046d_HD_Pro_Webcam_C920_50EBAE4F
|
||||
ansible_host=fd11:f055:a514::4 ansible_user=opentech room_type= room_id= webcam_name=
|
||||
ansible_host=fd11:f055:a514::5 ansible_user=opentech room_type= room_id= webcam_name=
|
||||
ansible_host=fd11:f055:a514::6 ansible_user=opentech room_type= room_id= webcam_name=
|
||||
x220-02 ansible_host=fd11:f055:a514::7 ansible_user=opentech room_type= room_id= webcam_name=usb-046d_HD_Pro_Webcam_C920_312AF46F
|
||||
|
|
|
@ -4,10 +4,10 @@ import (
|
|||
"bufio"
|
||||
"bytes"
|
||||
"fmt"
|
||||
"net"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
"net"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -49,7 +49,7 @@ hostname;
|
|||
`
|
||||
|
||||
func discover(host, user string) (hostname, roomType, roomId, webcamName string, err error) {
|
||||
cmd := exec.Command("/usr/bin/ssh", "-l", user, host, "sh", "-c", script)
|
||||
cmd := exec.Command("/usr/bin/ssh", "-o", "ConnectTimeout=3", "-l", user, host, "sh", "-c", script)
|
||||
fmt.Fprintf(os.Stderr, "command: %s\n", cmd)
|
||||
var out bytes.Buffer
|
||||
cmd.Stdout = &out
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
---
|
||||
- hosts: recorders
|
||||
roles:
|
||||
- productivity
|
||||
|
||||
- hosts: recorders
|
||||
roles:
|
||||
- role: laptop
|
||||
- role: recorder
|
||||
- role: monitoring-client
|
||||
- role: cloudalchemy.node-exporter
|
||||
tags: node_exporter
|
||||
vars:
|
||||
autostart: false
|
||||
|
|
|
@ -3,3 +3,4 @@
|
|||
- include: packages.yml
|
||||
- include: artwork.yml
|
||||
- include: obs.yml
|
||||
- include: textfile.yml
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
|
||||
- name: Log room for node_exporter
|
||||
become: yes
|
||||
copy:
|
||||
content: "room{type=\"{{ room_type }}\",id=\"{{ room_id }}\"} 1\n"
|
||||
dest: "/var/lib/node_exporter/room.prom"
|
||||
owner: root
|
||||
group: root
|
||||
mode: u=rw,g=r,o=r
|
||||
|
Loading…
Reference in New Issue