This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns rhq.plugin | |
(:require [rhq.config :as config]) | |
(:import [org.rhq.core.pluginapi.inventory | |
ResourceDiscoveryComponent ResourceDiscoveryContext ClassLoaderFacet | |
DiscoveredResourceDetails ResourceComponent ResourceContext] | |
[org.rhq.core.domain.measurement AvailabilityType]) | |
(:gen-class | |
:name rhq.plugin.PluginComponent | |
:implements [org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent | |
org.rhq.core.pluginapi.inventory.ResourceComponent])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plugin displayName="Clojure Test Plugin" | |
name="clj-test" | |
package="rhq.clj.test" | |
version="1.0" | |
xmlns:c="urn:xmlns:rhq-configuration" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns="urn:xmlns:rhq-plugin"> | |
<server class="rhq.plugin.PluginComponent" | |
discovery="rhq.plugin.PluginComponent" | |
name="CLJTestServer"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java.lang.ExceptionInInitializerError | |
at clojure.lang.Namespace.<init>(Namespace.java:34) | |
at clojure.lang.Namespace.findOrCreate(Namespace.java:176) | |
at clojure.lang.Var.internPrivate(Var.java:94) | |
at rhq.plugin.PluginComponent.<clinit>(Unknown Source) | |
at java.lang.Class.forName0(Native Method) | |
at java.lang.Class.forName(Class.java:247) | |
at org.rhq.core.pc.plugin.PluginComponentFactory.instantiateClass(PluginComponentFactory.java:246) | |
at org.rhq.core.pc.plugin.PluginComponentFactory.getDiscoveryComponent(PluginComponentFactory.java:113) | |
at org.rhq.core.pc.inventory.AutoDiscoveryExecutor.pluginDiscovery(AutoDiscoveryExecutor.java:170) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package rhq.clj.test; | |
import clojure.lang.RT; | |
import clojure.lang.Var; | |
import org.rhq.core.domain.measurement.AvailabilityType; | |
import org.rhq.core.pluginapi.inventory.*; | |
import java.util.HashSet; | |
import java.util.Set; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns rhq.clj.test) | |
(defn discover [] (.println System/out "DISCOVER")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create column family raw_metrics | |
with comparator = DateType and | |
default_validation_class = DoubleType and | |
key_validation_class = Int32Type; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create column family one_hour_metric_data | |
with comparator = 'CompositeType(DateType, Int32Type)' and | |
default_validation_class = DoubleType and | |
key_validation_class = Int32Type; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[default@rhq] get one_hour_metric_data[10261]; | |
=> (column=2012-06-14 16:00:00-0400:0, value=8528.610195208777, timestamp=1339707619159001, ttl=1209600) | |
=> (column=2012-06-14 16:00:00-0400:1, value=7914.6, timestamp=1339707619159002, ttl=1209600) | |
=> (column=2012-06-14 16:00:00-0400:2, value=8221.605097604388, timestamp=1339707619159000, ttl=1209600) | |
=> (column=2012-06-14 17:00:00-0400:0, value=80320.63306613911, timestamp=1339711200084005, ttl=1209600) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create column family metrics_aggregates_index | |
with comparator = 'CompositeType(DateType, Int32Type)' and | |
default_validation_class = Int32Type and | |
key_validation_class = UTF8Type; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Kernel sysctl configuration file | |
# | |
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and | |
# sysctl.conf(5) for more details. | |
# Controls IP packet forwarding | |
net.ipv4.ip_forward = 0 | |
# Controls source route verification | |
net.ipv4.conf.default.rp_filter = 1 |