Coder Social home page Coder Social logo

3cx_exporter's Introduction

3CX Exporter

Prometheus exporter for the 3CX PBX.

Build

Move to the cloned git directory and do go build

Configuration

Configuration is done with a config file in json format. Example:

{
  "Hostname": "YOUR-PBX-FQDN:PORT",
  "Username": "ADMIN-USERNAME",
  "Password": "ADMIN-PASSWORD"
}

Usage Example

Move binary to /usr/bin/ and create config file at /etc/3cx_exporter/config.json. Create following systemd service unit at /etc/systemd/system/3cx_exporter.service:

[Unit]
Description=3CX Prometheus Exporter
After=network.target

[Service]
Type=simple
Restart=always
ExecStart=/usr/bin/3cx_exporter -config /etc/3cx_exporter/config.json

License

MIT License, Copyright (c) 2018 Digineo GmbH

3cx_exporter's People

Contributors

chrisdeh avatar corny avatar pberndro avatar

Stargazers

 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

3cx_exporter's Issues

Feature Request: Metrics for Extensions and Queues

It would be nice to have metrics for extensions. For example if a extension is in a call or not, counters for calls made on a day (maybe separated if they're internal or external, inbound or outbound). Also it would be nice to have metrics for queues to see how many people are waiting for example.

404 page not found when accessing

When build the app the following way:

  1. Changing config path to "/etc/3cx_exporter/config.json" inside main.go
  2. go get github.com/digineo/3cx_exporter/exporter
  3. go get github.com/prometheus/client_golang/prometheus
  4. go get github.com/prometheus/client_golang/prometheus/promhttp
  5. go build
  6. creating config.json at the described path

When running the App from Shell and looking at Port 9523 the only response displayed is: "404 page not found"

ActiveCalls

I was trying to do a test here, but I saw that in the structure there is no call to part of the API other than activecalls.

https://host:5001/api/activecalls.

Would it be possible to get something from this url in 3cx_exporter?

Basically this is the structure.

package main

import "time"

type Call struct {
ID int json:"Id"
Caller string json:"Caller"
Callee string json:"Callee"
Status string json:"Status"
LastChangeStatus string json:"LastChangeStatus"
EstablishedAt string json:"EstablishedAt"
}

type ActiveCallsResponse struct {
Now string json:"Now"
List []Call json:"list"
}

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.