Skip to content

Instantly share code, notes, and snippets.

View Cromeshnic's full-sized avatar

Семён Кошечкин Cromeshnic

  • dsi.ru
  • Irkutsk, RussianFederation
View GitHub Profile
package ru.dsi.bgbilling.kernel.discount.bean;
import bitel.billing.server.contract.bean.CostSum;
import bitel.billing.server.contract.bean.ServiceCostCache;
import java.math.BigDecimal;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Calendar;
import bitel.billing.server.util.*;
import java.sql.*;
import java.util.*;
import bitel.billing.server.tariff.*;
import bitel.billing.server.contract.bean.*;
public void CopyNode(node_id,new_node_id,mtree_id,new_mtree_id,con)
{
query = "SELECT id, type, data, pos FROM mtree_node WHERE parent_node='"+node_id+"' and mtree_id='"+mtree_id+"'";
ps = con.prepareStatement(query);
@Cromeshnic
Cromeshnic / Template JMX BGInetAccounting 5.2.xml
Created December 17, 2014 06:08
Template for BGBilling v 5.2 BGInetAccounting server: http://bgbilling.ru/v5.2/doc/ch18.html
<?xml version="1.0" encoding="UTF-8"?>
<!--
Macros to be defined
* JMX_USERNAME
* JMX_PASSWORD
-->
<zabbix_export>
<version>2.0</version>
<date>2014-12-17T06:06:39Z</date>
@Cromeshnic
Cromeshnic / Template JMX BGInetAccess 5.2.xml
Last active August 29, 2015 14:11
Template for BGBilling v 5.2 BGInetAccess server: http://bgbilling.ru/v5.2/doc/ch18.html
<?xml version="1.0" encoding="UTF-8"?>
<!--
Macros to be defined
* JMX_USERNAME
* JMX_PASSWORD
-->
<zabbix_export>
<version>2.0</version>
<date>2014-12-17T05:57:30Z</date>
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>2.0</version>
<date>2013-11-13T07:44:38Z</date>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<templates>
@Cromeshnic
Cromeshnic / zbx_template_jmx_common.xml
Created October 7, 2013 06:27
Macros: {$JMX_USERNAME} {$JMX_PASSWORD}
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>2.0</version>
<date>2013-10-07T06:23:45Z</date>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<templates>
@Cromeshnic
Cromeshnic / zbx_template_jmx_activemq.xml
Created August 23, 2013 07:31
Zabbix 2.0 template for ActiveMQ with JMX LLD for brokers and destinations. Feel free to contribute.
<?xml version="1.0" encoding="UTF-8"?>
<!--
by Semyon Koshechkin (c) 2013
https://github.com/Cromeshnic
Zabbix ActiveMQ monitoring template with LLD support for:
- Brokers
- Topics
- Queues
@Cromeshnic
Cromeshnic / JMXItemChecker.java
Created August 22, 2013 04:47
zabbix_java JMX LLD patch. Usage example: jmx.discovery["org.apache.activemq:BrokerName=*,Type=Queue,Destination=*"]
/*
** Zabbix
** Copyright (C) 2000-2011 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
<?xml version="1.0" encoding="UTF-8"?>
<!--
Macros to be defined
* JMX_USERNAME
* JMX_PASSWORD
* HTTP_PORT (mandatory)
* HTTPS_PORT (mandatory)
* AJP_PORT (mandatory)