Skip to content

Backend for ClusterCockpit Monitoring Framework

License

Notifications You must be signed in to change notification settings

aw32/cc-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Run server

  • The server expects the SQLite Job database in ./job.db.
  • The metric data as JSON is expected in ./job-data/.../.../data.json.
  • A JSON-description of the clusters is expected in ./clusters/*.json.
  • Run go run server.go
  • The GraphQL backend is located at http://localhost:8080/query/ .

Debugging and Testing

There is a GraphQL PLayground for testing queries at http://localhost:8080/ .

Example Query:

query($filter: JobFilterList!, $sorting: OrderByInput!, $paging: PageRequest!) {
  jobs(
    filter: $filter
    order: $sorting
    page: $paging
  ) {
    count
    items {
      id
      jobId
      userId
      startTime
      duration
    }
  }
}

Using the Query variables:

{
  "filter": { "list": [
    {"userId": {"contains": "unrz"}},
    {"duration": {"from": 60, "to": 1000}},
    {"startTime": {"from": "2019-06-01T00:00:00.00Z", "to": "2019-10-01T00:00:00.00Z"}}]},
  "sorting": { "field": "start_time", "order": "ASC" },
  "paging": { "itemsPerPage": 20, "page": 1 }
}

Changing the GraphQL schema

  • Edit ./graph/schema.graphqls
  • Regenerate code: gqlgen generate
  • Implement callbacks in graph/resolvers.go

About

Backend for ClusterCockpit Monitoring Framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 59.7%
  • Svelte 35.8%
  • JavaScript 2.4%
  • Perl 0.9%
  • Makefile 0.9%
  • CSS 0.2%
  • Shell 0.1%