Hello Adrian, if the host for which you send gmetrics is not a gmond "client", you need to also spoof a "heartbeat" metric, else the collector will think the host is down :
HOST=ups.example.com
IP=$(getent hosts $HOST | cut -d" " -f1)
GMON=/etc/ganglia/gmond.UPS.conf
T=$(ping -qn -c 1 -w 6 $IP | grep rtt | cut -d/ -f 5 | sed s/\\.//)
if [ "$T" ] ; then
gmetric -c $GMON -n ping_time -t uint32 -u us -x 600 -d 7200 -g network -T
"ping avg time" -H -S ${IP}:${HOST} -v ${T}
....
(your custom gmetrics follow here)
and of course in the gmond.UPS.conf you put your separate "collector" gmond
host and port.
For the collector host, I run separate "client" gmond and multiple "collector"
gmond. The latter have separate config files with no "udp_send_channel", in
this way they don't send to themselves their own host metrics.
I think I posted on the list my "gmondsrv" init.d script last year or so...
mail me if you don't find it.
Cheers,
Sergio
PS if it's an APC, see the attachment, courtesy of a work colleague.
On 25 Jan 2014, at 19:22, Adrian Sevcenco <[email protected]> wrote:
> On 01/25/2014 08:02 PM, Bernard Li wrote:
>> Hi Adrian:
> Hi!
>
>> You might want to look into "spoofing"... it might help with what you're
>> doing.
> it helps in the sense that i choose the name of package data (e.g data
> comes from ups1).
> The problem is the destination : i want to have a distinct cluster (a
> cluster for upses, one for raid devices, one for switches) so i have to
> send data to a gmond that reports nothing else. (no other metrics at
> all, just what i send with gmetric)
>
> if i delete all metrics i just get that "no metrics defined"
>
> Thanks!
> Adrian
>
>>
>> Cheers,
>>
>> Bernard
>>
>> On Sat, Jan 25, 2014 at 4:19 AM, Adrian Sevcenco
>> <[email protected]> wrote:
>>> On 01/24/2014 10:47 AM, Cristovao Jose Domingues Cordeiro wrote:
>>>> Thank you for your replies Bernard and Shekar.
>>>>
>>>> Actually in the meanwhile I managed to make it work. For those who
>>>> might want to do the same here's what I did:
>>>>
>>>> · Stop gmond and gmetad, and clean the RRD database in the collector
>>>> (I was getting unspecified clusters and cached information so this
>>>> was a clean start)
>>>>
>>>> · I have 5 clusters so I've created 5 gmond.conf files -
>>>> gmond-cluster1.conf, gmond-cluster2.conf...etc. In these files I've
>>>> set up the cluster name, both udp and tcp ports to the same number,
>>>> and the hostname in the udp_send_channel to 'localhost'
>>> Hi! Is it possible to post your gmond settings?
>>> How did you solve the problem that the reporting node (where aggregation
>>> gmond sits) will also report the self metrics?
>>>
>>> My problem is a little different : i try to make a fake gmond for
>>> gmetric input for UPS/RAID/Switches metrics.
>>>
>>> Thanks a lot!
>>> Adrian
snmp_ups_APC.sh
Description: Binary data
------------------------------------------------------------------------------ CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments & Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________ Ganglia-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ganglia-general

