Giter Club home page Giter Club logo

site-monitor-operator's Introduction

site-monitor-operator

Aliyun site monitor operator

Install

update deploy/operator.yaml.example, add accesskey and access secrets. mv operator.yaml.example operator.yaml

cd deploy
kubectl apply -f .
cd crds
kubectl apply -f .

Example usage

kubectl apply -f - <<eof
apiVersion: sitemonitor.haodai.com/v1alpha1
kind: SiteMonitor
metadata:
  name: baidu.com
spec:
  TaskName: baidu.com
  TaskType: HTTP 
  HttpMethod: get  
  Timeout: 1000     
  Interval: 1    
  Address: http://www.baidu.com     
  TaskState: true  # default to true
  ContactGroups: defaultGroup  # must exist
eof


kubectl get sitemonitor
$ kubectl get sitemonitor
NAME        AGE
baidu.com   14s
$ kubectl get sitemonitor -o yaml
apiVersion: v1
items:
- apiVersion: sitemonitor.haodai.com/v1alpha1
  kind: SiteMonitor
  metadata:
    annotations:
      kubectl.kubernetes.io/last-applied-configuration: |
        {"apiVersion":"sitemonitor.haodai.com/v1alpha1","kind":"SiteMonitor","metadata":{"annotations":{},"name":"baidu.com","namespace":"default"},"spec":{"Address":"http://www.baidu.com","ContactGroups":"defaultGroup","HttpMethod":"get","Interval":1,"TaskName":"baidu.com","TaskState":true,"TaskType":"HTTP","Timeout":1000}}
    creationTimestamp: "2019-08-07T07:37:15Z"
    finalizers:
    - finalizer.sitemonitor.haodai.com
    generation: 1
    name: baidu.com
    namespace: default
    resourceVersion: "3253043"
    selfLink: /apis/sitemonitor.haodai.com/v1alpha1/namespaces/default/sitemonitors/baidu.com
    uid: 2d6c3df9-b8e6-11e9-a106-6e97fdc29d10
  spec:
    Address: http://www.baidu.com
    ContactGroups: defaultGroup
    HttpMethod: get
    Interval: 1
    TaskName: baidu.com
    TaskState: true
    TaskType: HTTP
    Timeout: 1000
  status:
    AlertState: 'ResponseTime: OK, Availability: OK'
    TaskState: true
kind: List
metadata:
  resourceVersion: ""
  selfLink: ""
$ 

$ kubectl delete sitemonitor baidu.com 
sitemonitor.sitemonitor.haodai.com "baidu.com" deleted
$

CloudMonitor UI

sitemonitor1

sitemonitor1

sitemonitor1

site-monitor-operator's People

Contributors

chinglinwen avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

zeus911

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.