Skip to content

Releases: dutoitc/copper

1.1.0, JDK11

06 Sep 13:28
Compare
Choose a tag to compare
1.1.0, JDK11 Pre-release
Pre-release

Test release of Copper, JDK11

Copper 1.0.0

26 Mar 19:54
Compare
Choose a tag to compare

First stable release of Copper.

  • Collectors: DB and JMX
  • Processors: (builtin based on cron)
  • Reporters: Pushover and EMail

How to use Copper:

  • Put copper*jar in a new folder
  • Create a sub-folder with name "stories" (optional: put stories in it)
  • Optional: create a copper.properties file
  • Launch Copper: java -jar copper-1.0-SNAPSHOT-shaded.jar
    Copper will then work as a daemon. You can use the WEB interface on http://localhost:30400/

Copper.properties format

Yet, the copper.properties file is optional, and only hold Mail properties:

# Some comments
mailServer=mail.yourserver.com
mailUsername=technical_username
mailPassword=technical_password
mailFrom=from_as_displayed
mailReplyTo=reply_to_address

Stories sample

JMX

GIVEN COLLECTOR JMX WITH url=service:jmx:rmi:///jndi/rmi://localhost:30409/server,user=null,password=null
    QUERY java.lang:type=Runtime FOR SpecName    AS JMX_LOCAL_RUNTIME_SPECNAME
    QUERY java.lang:type=Runtime FOR SpecVersion AS JMX_LOCAL_RUNTIME_SPECVERSION
WHEN CRON */5 7-18 * * 1-5
THEN STORE VALUES

DB

GIVEN COLLECTOR ORACLE WITH url=jdbc:oracle:thin:@mydbserver:1527/mydb,user=myuser,password=IlOvEc00peR
    QUERY "select count(case when table.status='something' then 1 end) MY_VALUE_SOMETHING,
                  count(case when table.status='another value' then 1 end) MY_VALUE_ANOTHER,
                  count(case when table2.x_status='youpida' then 1 end) MY_VALUE_YOUPIDA
           from myuser.table1 table left outer join myuser.table2 table2 on  table.id=table2.fk"
WHEN CRON 0 6-22 * * *
THEN STORE VALUES

Pushover

GIVEN STORED VALUES
WHEN CRON 5 8,10,12,14,16,18,20 * * *
THEN REPORT BY PUSHOVER to "dest1,dest2"
     WITH token="xxx"
     WITH title="New status from my application"
     WITH message="Status (something, another, youpida):
             {{MY_VALUE_SOMETHING}}, {{MY_VALUE_ANOTHER}}, {{MY_VALUE_YOUPIDA}}"

Mail

GIVEN STORED VALUES
WHEN CRON 5 8,10,12,14,16,18,20 * * *
THEN REPORT BY MAIL to "[email protected],[email protected]"
     WITH title="Mail test"
     WITH message="Status (something, another, youpida):
             {{MY_VALUE_SOMETHING}}, {{MY_VALUE_ANOTHER}}, {{MY_VALUE_YOUPIDA}}"

Webservice

Notes

  • Values are persisted in a local file
  • New files created in "stories" folder should be detected and used
  • If you have any problem or wish, open an issue in Github
  • Copper will be under hard development for 2016/Q1 and Q2, V1 is stable but come back to check newer versions !

Thanks for using Copper