View in #help on Slack
@ishulovely1: Hi Team.
My Sensu Server is on Linux and sensu client is on Windows
sensu Windows client is listening the checks written at sensu server.
Sensu Server is not able to publish the check results
plz help me on this
@aaronsachs: @ishulovely1 Can you clarify what version you’re running? Sensu Core or Sensu Go?
@ishulovely1: Sensu server at Linux install using baseurl=http://repositories.sensuapp.org/yum/el/7/x86_64/
@dzidic.marko: Hello,
There should be rabbitmq or redis between sensu server and sensu client.
@ishulovely1: and Windows one thrugh sensu-1.6.1-1-x64.msi
is rabbitmq or redis need to be install?
but i did integration betwwen two linux servers(sensu server,client_that worked fine with me
I gave transport information on client
@aaronsachs: @ishulovely1 Sensu Core does require that RabbitMQ and Redis are installed
The path for communication looks like the following: client<–>rabbitmq<–>server–>redis
@ishulovely1: opps you mean Rabbitmq and redis at windows and i install sensu core?
@aaronsachs: In Sensu Core, the client and server have no knowledge of the other w/out a transport
@ishulovely1: oh ok ok
@aaronsachs: https://docs.sensu.io/sensu-core/1.6/overview/how-sensu-works/#publishing-subscription-check-requests
Sensu Docs: How Sensu Works | Sensu Core 1.6
@ishulovely1: but it worked when sensu server and client are at Linux machine
i idnt install rabitmq and redis at client
@aaronsachs: https://docs.sensu.io/images/sensu-diagram.gif is useful for understanding the flow
600x600px image
The client doesn’t require rabbitmq/redis
Only the server
Well
You can install sensu-server, sensu-api, rabbitmq, and redis on the same server
you’ll likely want to split those off at some point
but the client must be pointed at Rabbtimq
@ishulovely1: see i install all these (sensu-server, sensu-api, rabbitmq, and redis on the same server)
then client is on Windows server
@aaronsachs: right, so your client will have to have the following configuration files present: client.json, transport.json, rabbitmq.json
@ishulovely1: ya files are there
and listening to the server as well.
@aaronsachs: What does transport/rabbitmq look like on the client?
@ishulovely1: I can see logs at client
but it is not publishing on server thats it
{
"rabbitmq": {
"host": "127.0.0.1",
"port": 5671,
"vhost": "/sensu",
"user": "sensu",
"password": "secret",
this info is there at client
and i guess this is only required
@aaronsachs: That has to point the linux server where rabbitmq is installed
@ishulovely1: ya
it is
i just gave you example
@aaronsachs: .
Hmmmmmm
So it seems like something is missing then
@ishulovely1: ya
we see publishing results after command
but results are not publishing
on the sensu server
@dzidic.marko:
@ishulovely1: i am getting no erro as well
@dzidic.marko: Set rabbitmq string at sensu-server config, and same for sensu-client
@ishulovely1 https://docs.sensu.io/sensu-core/1.6/reference/rabbitmq/#reference-documentation
Sensu Docs: RabbitMQ Configuration | Sensu Core 1.6
@aaronsachs: https://docs.sensu.io/sensu-core/1.6/faq/#sensu-frequently-asked-questions will also tell you what files need to live where (at the bottom)
Sensu Docs: FAQs | Sensu Core 1.6
So without getting into your windows box, it seems like the rabbitmq.json file isn’t pointed at the linux server
or if it is, then the traffic isn’t being allowd
at least those are the first two things I would check
And a pcap to see if traffic is hitting the port on the linux server would confirm that for sure
@ishulovely1: I am checking.
Will ping you soon
{"timestamp":"2019-02-15T16:50:12.816477+0000","level":"info","message":"i am now the leader"}
{"timestamp":"2019-02-15T16:50:21.035695+0000","level":"info","message":"publishing check request","payload":{"type":"metric","command":"\\opt\\sensu\\embedded\\bin\\ruby C:\\opt\\sensu\\embedded\\bin\\metrics-disk-usage.rb","handlers":["debug","default"],"name":"Disk_Windows","issued":1550249421},"subscribers":["windows-hosts"]}
{"timestamp":"2019-02-15T16:50:31.036939+0000","level":"info","message":"publishing check request","payload":{"type":"metric","command":"\\opt\\sensu\\embedded\\bin\\ruby C:\\opt\\sensu\\embedded\\bin\\metrics-disk-usage.rb","handlers":["debug","default"],"name":"Disk_Windows","issued":1550249431},"subscribers":["windows-hosts"]}
@aaronsachs I have written windows command
These line keep on repeating
@aaronsachs: Right, so what does the windows host show in the logs?
Is it executing those check requests?
@ishulovely1: it is executing at client
giving the check publishing results at windows sensu client
ya it is executing and publishing as well
in std out file
Hey @aaronsachs it seems like it is done
I am inserting metrics into Influxdb
so i am getting results in DB
i guess for windows metrics, it doesn’t display data
@aaronsachs: Did you figure out what was preventing the events from being published?
@ishulovely1: might be i dont know
I guess i should have seen InfluxDB before
It is inserting data. but not showing on seeing log at server specially or window checks
@aaronsachs: I’m also curious about whether the ruby metric disk usage works as expected on windows
Have you looked at https://github.com/sensu-plugins/sensu-plugins-windows @ishulovely1?
sensu-plugins/sensu-plugins-windows
That might be better suited for windows hosts than using the Ruby ones
Unless someone from the community has a better suggestion
I know @csabo has done quite a bit w/ windows
@sysadmin: @sysadmin has joined the channel
@ishulovely1: no idea
@aaronsachs one more question, data is inserting into INfluxDB from Windows client
but know you as compared to linux client it is inserting very slow and late
but it is working
@aaronsachs: Well, the client doesn’t do the insertion
it’s the server
So handling events happens server-side
@ishulovely1: I have one handler which insert data into Influxdb thats it
means which take care of Influxdb
not insert
mutuator is inserting data
@aaronsachs: …
Mutators don’t insert data
Handlers do
So ONLY the handler inserts data
@ishulovely1: Is there any thing we can do to insert fast?
but for Linux sensu client it is very fast
@aaronsachs: Let’s take influxdb out of the picture for a second
@ishulovely1: ok
@aaronsachs: Every time an event is handled, it spins up a process
(ruby process on the host where sensu-server is installed)
So depending on the event that comes through and how that event is supposed to get handled, it can be quick, or can take some time
@ishulovely1: oh ok
anyways, if i am getting data or inserting 10 rows in a minute also fine for me,
@aaronsachs: So depending on how long it takes to 1.) get the results from the windows agent 2.) mutate that data, and 3.) send that data off to influx, you can see variance
@ishulovely1: ya exactly
make sense
@aaronsachs: If the linux agent is on the server, then it’s probably taking a lot less time to send those results through rabbitmq to the server process to be handled
I’d be curious to see what would happen with a linux agent not on the server
@ishulovely1: ya i guess, we are good
@aaronsachs:
Test it out though
@ishulovely1: ya
@aaronsachs: If you’re seeing variance in insert times on remote hosts
Then I’d take into account any latency that would occur as a result of having to send that event data to the server itself
@ishulovely1: ya i think so
@aaronsachs: You might look at using something like https://github.com/sensu-plugins/sensu-plugins-windows/blob/master/bin/powershell/metric-windows-disk.ps1 for disk checks on windows to see if that increases performance in any way
[sensu-plugins/sensu-plugins-windows] bin/powershell/metric-windows-disk.ps1
It could also be that ruby is taking longer to get those results on a windows system vs powershell
But again, test it
see what you get
@ishulovely1: ya, correct
the output format will be same which ruby give?
i meant ruby vs powershell resultant output of a command?
@aaronsachs: By default all of the community plugins default to outputting to graphite format
So they should be the same
@ishulovely1: OK
I learnt alot from you today.
its time to say Thank you so much to you
@aaronsachs: np! glad to help!