servicegraph

package
v0.0.0-...-fe632b3 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

README

Istio Servicegraph ** DEPRECATED. **

Servicegraph is being replaced by Kiali as the default visualization integration.

Servicegraph is a small app that generates and visualizes graph representations of your Istio service mesh. Servicegraph is dependent on the Prometheus addon and the standard metrics configuration. The documentation for deploying and using Servicegraph is here.

Visualizations

  • /force/forcegraph.html is an interactive D3.js visualization.

  • /dotviz is a static Graphviz visualization.

Serializations

  • /dotgraph provides a DOT serialization.

  • /d3graph provides a JSON serialization for D3 visualization.

  • /graph provides a JSON serialization.

Query Parameters

All endpoints take these query parameters:

  • time_horizon controls the timespan to consider for graph generation. Format is a number plus a time unit. Example 15s or 1m. Default is 5m.

  • filter_empty=true will restrict the nodes and edges shown to only those that reflect non-zero traffic levels during the specified time_horizon. Default is false.

  • destination_namespace will filter the nodes and edges show to only those where the destination workload is in the given namespace.

  • destination_workload will filter the nodes and edges show to only those where the destination workload is with the given name.

  • source_namespace will filter the nodes and edges show to only those where the source workload is in the given namespace.

  • source_workload will filter the nodes and edges show to only those where the source workload is with the given name.

Demosvc service

Defined in servicegraph/cmd/demosvc, this provides a simple HTTP endpoint that generates Prometheus metrics. This can be used to test the servicegraph service.

Documentation

Overview

Package servicegraph defines the core model for the servicegraph service.

Package servicegraph defines the core model for the servicegraph service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateD3JSON

func GenerateD3JSON(w io.Writer, g *Dynamic) error

GenerateD3JSON converts the standard Dynamic graph to d3Graph, then serializes to JSON.

Types

type Attributes

type Attributes map[string]string

Attributes contain a set of annotations for an edge.

type Dynamic

type Dynamic struct {
	Nodes map[string]struct{} `json:"nodes"`
	Edges []*Edge             `json:"edges"`
}

Dynamic represents a service graph generated on the fly.

func (*Dynamic) AddEdge

func (d *Dynamic) AddEdge(src, target string, lbls map[string]string)

AddEdge adds a new edge to an existing dynamic graph.

func (*Dynamic) Merge

func (d *Dynamic) Merge(static *Static)

Merge adds all of the nodes in the static graph into the dynamic graph.

type Edge

type Edge struct {
	Source string     `json:"source"`
	Target string     `json:"target"`
	Labels Attributes `json:"labels"`
}

Edge represents an edge in a dynamic service graph.

type SerializeFn

type SerializeFn func(w io.Writer, g *Dynamic) error

SerializeFn provides a mechanism for writing out the service graph.

type Static

type Static struct {
	Nodes map[string]struct{}
}

Static represents a service graph generated by API calls that is meant to persist across generation requests. It must be merged with a Dynamic graph to provide a complete service graph for Istio.

Directories

Path Synopsis
cmd
Package dot provides serialization utilities for a servicegraph using the dot format.
Package dot provides serialization utilities for a servicegraph using the dot format.
Package promgen generates service graphs from a prometheus backend.
Package promgen generates service graphs from a prometheus backend.

Jump to

Keyboard shortcuts

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