Giter Site home page Giter Site logo

panorama's Introduction

Panorama: Capturing and Enhancing In Situ System Observability for Failure Detection

This is the repository for the Panorama system described in our OSDI '18 paper.

Usage

Requirements

Panorama is written in Go. To use it, you must have the Go compiler installed. You can download the Go distribution from the official website. The code is tested with Go 1.8.

In addition, the RPC layer of Panorama is built on top of gRPC and Protocol Buffers. A protobuf compiler is required. We have tested with protoc version 3.5.1 but recent versions should also work. To parse the Panorama service definitions, the protobuf Go plugin protoc-gen-go is also needed. We recommend to get the version 1.2.0, which supports Go 1.8. Both protoc and protoc-gen-go should be in the PATH.

Download & Installation

Easiest way is to use go get -u github.com/ryanphuang/panorama. You can also manually clone the repo to your $GOPATH/src and then build it with:

$ cd panorama
$ make

If you don't have the protobuf Go plugin, the Makefile provides a target to install it:

$ make tool-deps

Note that it will also install dep for dependency management.

Afterwards, you will find hview-server, hview-client in $GOPATH/bin. Panorama also comes with a thin Java client wrapper library. To get the Java client library, type make java. The library will be generated in client/java/target/dh-client-1.0-SNAPSHOT-jar-with-dependencies.jar.

Generate Panorama service config

$ hview-mkrc -fix_port 6688 -nserver 10 -addressp razor%d -namep pano%d -id pano0 -filter -subjects nn1,dn1,dn2,dn3 will make a Panorama service config that consists of 10 Panorama instances pano[0-9], each listening to the address razorX:6688. This particular Panorama instance is identified by pano0. The service is also configured to filter observations based on subjects, meaning only observations about nn1,dn1,dn2,dn3 are accepted into the LOS. The resulted config is written to standard output:

{
    "Addr": "razor0:6688",
    "Id": "pano0",
    "Subjects": [
        "nn1",
        "dn1",
        "dn2",
        "dn3"
    ],
    "Peers": {
        "pano0": "razor0:6688",
        "pano1": "razor1:6688",
        "pano2": "razor2:6688",
        "pano3": "razor3:6688",
        "pano4": "razor4:6688",
        "pano5": "razor5:6688",
        "pano6": "razor6:6688",
        "pano7": "razor7:6688",
        "pano8": "razor8:6688",
        "pano9": "razor9:6688"
    },
    "FilterSubmission": true,
    "LogLevel": "",
    "DumpMemUsage": false,
    "DBFile": "deephealth.db",
}

$ hview-mkrc -fix_port 6688 -nserver 10 -addressp razor%d -namep pano%d -id pano0 -output hs.cfg will save the configuration to file hs.cfg and prints its content to standard output.

Starting Panorama instance

To start a single Panorama server, run the following command (replace razor0 with the hostname or just localhost),

$ hview-server -addr razor0:6688 pano0

Note that the service will run in the foreground. Support for a daemon service is in the TODO list. But a simple way is just to start with hview-server -addr razor0 pano0 > dhs.log 2>&1 &

To start a Panorama service with multiple participating peers, use the configuration file generated above:

$ hview-server -config hs.cfg

Using the log monitor tool to participate in observation reporting

For example, to use the ZooKeeper plugin of the logtail tool, run $ hview-logtail -stale=-1 -server razor0:6688 -log ~/software/zookeeper/zookeeper.out zookeeper --ensemble ~/software/zookeeper/conf/zoo.cfg --filter conf/zoo_filter.json

Querying or reporting using Panorama client

Submit an observation

To start Panorama client in an interactive mode, run

$ hview-client -server razor0:6688

The -server razor0:6688 can be omitted if you are querying a local Panorama instance listening at the default port.

An example session is as follows:

> help
Command list:
         me observer
         report subject [<metric:status:score...>]
         get [report|view|inference|panorama] [observer] subject 
         list [subject]
         dump [inference|panorama]
         ping
         help
         exit

> me peer@2
> report peer@1 snapshot:u:30
Accepted
> get report peer@1
observer:"peer@2" subject:"peer@1" observation:<ts:<seconds:1495181595 nanos:385767379 > metrics:<key:"snapshot" value:<name:"snapshot" value:<status:UNHEALTHY score:30 > > > >
>

On the server side, we can tail the server log dhs.log, which if successful may produce something like this:

2017-05-19T08:13:15Z[DEBUG] raw.go:89: add report for peer@1 from peer@2...
2017-05-19T08:13:15Z[DEBUG] raw.go:114: create view for peer@2->peer@1...
2017-05-19T08:13:15Z[DEBUG] raw.go:117: add observation to view peer@2->peer@1: 2017-05-19T08:13:15.385767379Z { snapshot: UNHEALTHY, 30.0; }
2017-05-19T08:13:15Z[DEBUG] service.go:173: sent report for peer@1 for inference
2017-05-19T08:13:15Z[DEBUG] inference.go:82: received report for peer@1 for inference
2017-05-19T08:13:15Z[DEBUG] majority.go:55: score sum for snap is 30.000000
2017-05-19T08:13:15Z[DEBUG] inference.go:60: inference result for peer@1: 2017-05-19T08:13:15.387037413Z { snapshot: UNHEALTHY, 30.0; }

Query health report

To list all subjects that have been observed,

$ hview-client list subject

peer@1  2017-05-21 08:00:39.367133633 +0000 UTC
peer@4  2017-05-21 08:00:39.35836465 +0000 UTC
peer@3  2017-05-21 08:00:39.360098717 +0000 UTC
peer@2  2017-05-21 08:00:39.361055495 +0000 UTC
peer@8  2017-05-21 08:00:39.362379457 +0000 UTC
peer@9  2017-05-21 08:00:39.365596665 +0000 UTC

To get a panorama for a particular subject,

$ hview-client get panorama peer@9

[[... peer@9->peer@9 (1 observations) ...]]
  |peer@9| 2017-05-19T17:16:25Z { SyncThread: UNHEALTHY, 20.0; }

To dump all inference for all observed subjects,

$ hview-client dump inference

=============peer@1=============
[peer@9] ==> peer@1: 2017-05-21T08:00:39.367278005Z { RecvWorker: UNHEALTHY, 20.0; }
=============peer@4=============
[peer@9] ==> peer@4: 2017-05-21T08:00:39.358928732Z { RecvWorker: UNHEALTHY, 20.0; }
=============peer@3=============
[peer@9] ==> peer@3: 2017-05-21T08:00:39.360242189Z { SendWorker: UNHEALTHY, 20.0; }
=============peer@2=============
[peer@9] ==> peer@2: 2017-05-21T08:00:39.361172754Z { SendWorker: UNHEALTHY, 20.0; }
=============peer@8=============
[peer@9] ==> peer@8: 2017-05-21T08:00:39.362531433Z { SendWorker: UNHEALTHY, 20.0; }
=============peer@9=============
[peer@9] ==> peer@9: 2017-05-21T08:00:39.365718626Z { SyncThread: UNHEALTHY, 20.0; }

TODO

  • Parallelize report propagation
  • Re-initialize state from report db after restart

panorama's People

Contributors

ryanphuang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

panorama's Issues

Rename codename

Rename codename from deephealth into panorama to be consistent.

Make Java client retry after disconnection

If a Panorama instance crashes, the Java client that an in situ observer uses will lose connection and unable to make RPCs even after the instance is restarted. Need to fix it.

Clean-up of struct initializer due to recent protoc3 enforcing keyed literals

The recent Go protoc3 enforces using keyed literals in struct, and introduces changes that will generate additional fields such as XXX_NoUnkeyedLiteral in the protobuf messages, which may cause side effects when using the message in map keys or == test. Need to change all struct initialization to use keyed literals. Also, double check the Panorama's code to eliminate the map key side effects.

non-standard import ...... in standard package

After executing the command "make" , some errors are returned, as is following:
mkdir -p build/gen
protoc -I=idl --go_out=plugins=grpc:build/gen idl/*.proto
go get ./...
/usr/local/go/src/panorama/build/gen/health.pb.go:8:2: non-standard import "github.com/golang/protobuf/proto" in standard package "panorama/build/gen"
/usr/local/go/src/panorama/types/health.go:12:2: non-standard import "github.com/golang/protobuf/ptypes" in standard package "panorama/types"
/usr/local/go/src/panorama/decision/majority.go:4:2: non-standard import "github.com/golang/protobuf/ptypes/timestamp" in standard package "panorama/decision"
/usr/local/go/src/panorama/exchange/exchange.go:7:2: non-standard import "github.com/golang/protobuf/ptypes" in standard package "panorama/exchange"
/usr/local/go/src/panorama/service/service.go:8:2: non-standard import "github.com/golang/protobuf/ptypes" in standard package "panorama/service"
/usr/local/go/src/panorama/store/raw.go:13:2: non-standard import "github.com/golang/protobuf/ptypes" in standard package "panorama/store"
make: *** [get] Error 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.