Changeset View
Changeset View
Standalone View
Standalone View
site-modules/profile/manifests/swh/deploy/graph.pp
Show All 32 Lines | ::systemd::unit_file {$unit_name: | ||||
ensure => present, | ensure => present, | ||||
content => template("profile/swh/deploy/graph/${unit_name}.erb"), | content => template("profile/swh/deploy/graph/${unit_name}.erb"), | ||||
mode => '0644', | mode => '0644', | ||||
} ~> service {$service['name']: | } ~> service {$service['name']: | ||||
ensure => $service['status'], | ensure => $service['status'], | ||||
enable => $service['enable'], | enable => $service['enable'], | ||||
} | } | ||||
} | } | ||||
$backend_listen_host = lookup("swh::deploy::graph::backend::listen::host") | |||||
$backend_listen_port = lookup("swh::deploy::graph::backend::listen::port") | |||||
ardumont: Actual output is:
```
$ curl http://granet.internal.softwareheritage.org:5009
<html>… | |||||
$http_check_string = "graph API server" | |||||
$icinga_checks_file = lookup('icinga2::exported_checks::filename') | |||||
# swhgraphdev.service exposes the main graph server. | |||||
# Ensure the port is working ok through icinga checks | |||||
@@::icinga2::object::service {"swh-graph api (local on ${::fqdn})": | |||||
service_name => "swh-graph api (localhost)", | |||||
import => ['generic-service'], | |||||
host_name => $::fqdn, | |||||
check_command => 'http', | |||||
command_endpoint => $::fqdn, | |||||
vars => { | |||||
http_address => $local_check_address, | |||||
http_vhost => $local_check_address, | |||||
http_port => $backend_listen_port, | |||||
http_uri => '/', | |||||
http_header => ['Accept: application/json'], | |||||
http_string => $http_check_string, | |||||
}, | |||||
target => $icinga_checks_file, | |||||
tag => 'icinga2::exported', | |||||
} | |||||
if $backend_listen_host != '127.0.0.1' { | |||||
@@::icinga2::object::service {"swh-graph api (remote on ${::fqdn})": | |||||
service_name => "swh-graph api (remote)", | |||||
import => ['generic-service'], | |||||
host_name => $::fqdn, | |||||
check_command => 'http', | |||||
vars => { | |||||
http_vhost => $::swh_hostname['internal_fqdn'], | |||||
http_port => $backend_listen_port, | |||||
http_uri => '/', | |||||
http_header => ['Accept: application/json'], | |||||
http_string => $http_check_string, | |||||
}, | |||||
target => $icinga_checks_file, | |||||
tag => 'icinga2::exported', | |||||
} | |||||
} | |||||
} | } |
Actual output is:
So i took the part talking about the graph.