ecflow_watchman

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2019 License: MIT Imports: 6 Imported by: 0

README

ecflow-watchman

Watch ecflow servers.

Install

ecflow-watchman uses ecflow-client-go package which requires ecFlow and boost.

Set some environment variables before build the library.

export ECFLOW_BUILD_DIR=/some/path/to/ecflow/build
export ECFLOW_SOURCE_DIR=/some/path/to/ecflow/source
export BOOST_LIB_DIR=/some/path/to/boost/stage/lib

Please visit ecflow-client-go for more information.

Use Makefile to build the project and ecflow_watchman will be under bin directory.

Getting Started

ecflow_watchman watch-all command watches all ecflow servers listed in the config file, and sends collected status into a redis server.

ecflow_watchman watch-all --config-file=/some/config/file/path

Config

The following is an example config file.

global:
  scrape_interval: 20s
  scrape_timeout: 10s # not worked

scrape_configs:
  -
    job_name: job name
    owner: owner
    repo: repo
    host: ecflow server host
    port: ecflow server port

sink_config:
  type: redis # only redis is supported
  url: redis url

owner and repo are used in key name for redis.

License

Copyright 2019, perillaroc

ecflow-watchman is licensed under MIT License.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version   = "Unknown version"
	BuildTime = "Unknown build time"
	GitCommit = "Unknown GitCommit"
)

Functions

func GetEcflowStatus

func GetEcflowStatus(config EcflowServerConfig, redisUrl string)

func PrintVersionInformation

func PrintVersionInformation()

func StoreToRedis

func StoreToRedis(config EcflowServerConfig, ecflowServerStatus EcflowServerStatus, redisUrl string)

Types

type EcflowServerConfig

type EcflowServerConfig struct {
	Owner          string `yaml:"owner"`
	Repo           string `yaml:"repo"`
	Host           string `yaml:"host"`
	Port           string `yaml:"port"`
	ConnectTimeout int    `yaml:"connect_timeout"`
}

type EcflowServerStatus

type EcflowServerStatus struct {
	StatusRecords []ecflow_client.StatusRecord `json:"status_records"`
	CollectedTime time.Time                    `json:"collected_time"`
}

Directories

Path Synopsis
cmd
cli

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL