Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Arik_Ovtracht
Employee
Employee

Ansible playbook for Skyline configuration?

Hi everyone,

Skyline (sk178566) configuration is possible using a simple REST API command.

Has any of you created an ansible playbook for doing that on multiple devices?

 

0 Kudos
3 Replies
Hugo_vd_Kooij
Advisor

I am still looking for a solution the other way around. So instead of the unit pushing data I want to fetch the data.  

<< We make miracles happen while you wait. The impossible jobs take just a wee bit longer. >>
0 Kudos
the_rock
Legend
Legend

Same here.

0 Kudos
Erik_Lagzdins
Employee Employee
Employee

Here is an example of an old playbook & template file I've used in my lab to setup Skyline that may be a useful to you.

Playbook:

---
- name: "Configure the Skyline /opt/CPotelcol/config.yaml file, then stop/start the Skyline service"
  gather_facts: no
  hosts: gateways

  tasks:
     - name: "Template Skyline config.yaml file"
       template:
         src: skyline_fw_config.j2
         dest: /opt/CPotelcol/config.yaml

     - name: "Stop Skyline"
       shell: /opt/CPviewExporter/stop_skyline

     - name: "Start Skyline"
       shell: /opt/CPviewExporter/start_skyline

 

 

 

 

Required skyline_fw_config.j2 template file:

  • This template assumes you have the {{ hostname }} and {{ skyline_receiver_ip }} variables set in your host_vars or in group_vars for each target gateway.
  • This template also  assumes the TLS certificate files are already  copied to the gateway's filesystem in the correct locations.
receivers:
  otlp:
    protocols:
      grpc:
        tls:
          client_ca_file: /opt/CPotelcol/certs/collector.crt
          cert_file: /opt/CPotelcol/certs/collector.crt
          key_file: /opt/CPotelcol/certs/collector.key

exporters:
  prometheusremotewrite:
    endpoint: "http://{{skyline_receiver_ip}}:9090/api/v1/write"
    #tls:
      #cert_file: /tmp/mycerts/promexport.crt
      #key_file: /tmp/mycerts/promexport.key
      #ca_file: /tmp/mycerts/prometheus.crt
    external_labels:
     instance: {{hostname}}
     job: skyline
    resource_to_telemetry_conversion:
      enabled: true

processors:
  batch:

extensions:
  health_check:

service:
  extensions: [health_check]
  pipelines:
    metrics:
      receivers: [otlp]
      processors: [batch]
      exporters: [prometheusremotewrite]

 

 

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events