saltstack-formulas / prometheus-formula

Manage a Prometheus installation
Other
27 stars 51 forks source link

MacOS: needs service management #8

Closed noelmcloughlin closed 4 years ago

noelmcloughlin commented 5 years ago

On MacOS: service management is missing

          ID: prometheus-service-running-prometheus-service-running
    Function: service.running
        Name: prometheus
      Result: False
     Comment: The named service prometheus is not available
     Started: 15:02:39.076940
    Duration: 205.858 ms
     Changes:   
----------
          ID: prometheus-service-running-alertmanager-service-running
    Function: service.running
        Name: alertmanager
      Result: False
     Comment: The named service alertmanager is not available
     Started: 15:02:39.283893
    Duration: 203.401 ms
     Changes:   

Summary for local
-------------
Succeeded: 40
Failed:     2

The failed states are more verbose on reruns

          ID: prometheus-service-running-prometheus-service-running
    Function: service.running
        Name: prometheus
      Result: False
     Comment: An exception occurred in this state: Traceback (most recent call last):
                File "/usr/local/Cellar/salt/2019.2.0_1/libexec/lib/python3.7/site-packages/salt/state.py", line 1933, in call
                  **cdata['kwargs'])
                File "/usr/local/Cellar/salt/2019.2.0_1/libexec/lib/python3.7/site-packages/salt/loader.py", line 1939, in wrapper
                  return f(*args, **kwargs)
                File "/usr/local/Cellar/salt/2019.2.0_1/libexec/lib/python3.7/site-packages/salt/states/service.py", line 928, in mod_watch
                  __salt__['service.stop'](name)
                File "/usr/local/Cellar/salt/2019.2.0_1/libexec/lib/python3.7/site-packages/salt/modules/mac_service.py", line 439, in stop
                  domain_target, path = _get_domain_target(name)
                File "/usr/local/Cellar/salt/2019.2.0_1/libexec/lib/python3.7/site-packages/salt/modules/mac_service.py", line 208, in _get_domain_target
                  service = _get_service(name)
                File "/usr/local/Cellar/salt/2019.2.0_1/libexec/lib/python3.7/site-packages/salt/modules/mac_service.py", line 142, in _get_service
                  raise CommandExecutionError('Service not found: {0}'.format(name))
              salt.exceptions.CommandExecutionError: Service not found: prometheus
     Started: 15:21:40.570968
    Duration: 404.503 ms
     Changes:   
----------
          ID: prometheus-service-running-alertmanager-service-running
    Function: service.running
        Name: alertmanager
      Result: False
     Comment: An exception occurred in this state: Traceback (most recent call last):
                File "/usr/local/Cellar/salt/2019.2.0_1/libexec/lib/python3.7/site-packages/salt/state.py", line 1933, in call
                  **cdata['kwargs'])
                File "/usr/local/Cellar/salt/2019.2.0_1/libexec/lib/python3.7/site-packages/salt/loader.py", line 1939, in wrapper
                  return f(*args, **kwargs)
                File "/usr/local/Cellar/salt/2019.2.0_1/libexec/lib/python3.7/site-packages/salt/states/service.py", line 928, in mod_watch
                  __salt__['service.stop'](name)
                File "/usr/local/Cellar/salt/2019.2.0_1/libexec/lib/python3.7/site-packages/salt/modules/mac_service.py", line 439, in stop
                  domain_target, path = _get_domain_target(name)
                File "/usr/local/Cellar/salt/2019.2.0_1/libexec/lib/python3.7/site-packages/salt/modules/mac_service.py", line 208, in _get_domain_target
                  service = _get_service(name)
                File "/usr/local/Cellar/salt/2019.2.0_1/libexec/lib/python3.7/site-packages/salt/modules/mac_service.py", line 142, in _get_service
                  raise CommandExecutionError('Service not found: {0}'.format(name))
              salt.exceptions.CommandExecutionError: Service not found: alertmanager
     Started: 15:21:41.180468
    Duration: 418.77 ms
     Changes:   

Summary for local
-------------
Succeeded: 40 (changed=39)
Failed:     2