On 07/02/2016 11:54 AM, Josh Holman wrote:
> Hi Alan!
>
>   Hope this finds you well. I am having an issue I hope you can  help
> me with as well as a few questions. I have built the most recent AP
> from git source(Ubuntu 14.04) and am using Neo4j 3.0.3 and I am seeing
> the following error with one of the CMA messages:
That's impressive. It can be a pain to get all the prerequisites in
place. That's why I wrote the installer script ;-).

...

>
> Misc. Questions:
>
> Any methods,plans or ideas on how to monitor upstart/systemd managed
> services?
> I have a printer on my home network with an IP that I can ping, but it
> does not get discovered.
The IP and MAC address should get discovered. It will show up the first
time it ARPs. Is it possible that printers don't need to ARP? I suppose
if it never makes an outbound connection, then perhaps it will never
ARP. If it's going to ARP it would be when someone is sending it a job.
>From Googling, I see that some HP printers ARP excessively - obviously
yours doesn't.

I'm pretty sure an ARP cache is a required part of the IP stack, and
that clients are required by the spec to update their caches
periodically. But for something like a printer, it's possible that you
could get away with no ARPs ever. As long as the client IP address
doesn't move during a print job, then you could probably write a custom
TCP stack that avoids ARPs. Doesn't seem horribly likely. But it is
probably the case that printers need to ARP pretty rarely - and only
when someone is sending a print job or asking status. If the printer is
sending asynchronous notifications (out of paper, out of ink), then
those might require ARPing. I don't know how those protocols work (nor
which one you're using anyway).

> How do I turn on/off monitoring for specific nodes/services?
At the moment you can't. However, monitoring probably isn't so much what
you want to turn off as is alerting. Alerting is usually the thing that
people want control over. I have a theory (at least for production
systems): If you are providing it, you should monitor it. If you don't
want to monitor it, then don't provide it.

You can change the monitoring interval, timeout, and so on for a
particular service or node:service combination. There is a configuration
file that you can supply where you can specify this. Yes, you can
provide a config file. It's all JSON of course ;-). The code which
implements parsing and validating the configuration file is in
cmaconfig.py. There are a lot of things you can configure in the config
file. If you want to see what configuration you're getting by default,
then run that script as a command. Of course, it won't tell you what all
those things /mean/ ;-). I've attached a copy that I got from running it
on my desktop machine.

> Are the monrules loaded to neo4j like the queries and BPs? If so, how?
They /should/ be - but aren't at the moment. I implemented that one
first, and hadn't come up with a method I was happy with. I was a little
overly concerned with efficiency - and didn't know Cypher that well ;-).
I'm still not an expert, but I was less though back then...
> Do you have any Cypher queries that you use that are especially useful
> for visualization purposes?
Yes. As of 1.1.7, there are queries that return a subgraph. For reasons
related to the Cypher language and what kinds of parameters you can
provide for queries, the query has to be constructed in Python. I
currently have two such queries in query.py:
    PythonDroneSubgraphQuery
    PythonAllDronesSubgraphQuery

All subgraph queries return a single row with two fields. The first
field is the set of all the nodes in this subgraph, and the second field
is the set of all the relationships that connect the nodes.

So you then give it to something that draws a graph out of this
information. The key is that you get to specify what nodes and
relationships you want to appear in the subgraph. If you're a network
guy, you probably want network things. Almost nobody wants everything -
your brain would explode ;-). [About like on the scifi/political farce
"Brain Dead" {or is it really a documentary? ;-)}].

Both queries start with Drone (agent-equipped servers) objects as the
starting point. The query then follows the given relationship types, and
all the paths they can create using the given relationship types to wind
up in nodes of the given types.

So, in the first case, you specify which nodes to start in. In the
second case, all Drones are used.

A subgraph query quirk:
These query don't guarantee that the paths it follows don't go through
nodes of some type that you excluded. It does guarantee that the
resulting node types in the answer are all only of the kind you
specified. So, in some odd cases you might wind up with relationships
that go through nodes that were excluded. As a result, it's also
possible that some of the nodes in the answer might not show as
reachable from the initial start nodes. They are reachable - but through
a node type that you excluded.

I don't know how to write Cypher which guarantees that the
shortestpath() call won't go through excluded node types. It already
won't use excluded relationship types.

> One that paints a pretty network picture?
The drawwithdot program uses one of those subgraph queries to draw a few
kinds of pretty pictures.
> I see there is some new vagrant and docker stuff, what about plain old
> LXC containers?
Not at the moment. The mechanism I came up with is capable of handling
LXC containers too. You have to have a way to enumerate the new
encapsulation objects (like LXC), and you have to have a way to run a
command inside one of the encapsulated OSes - analogous to "docker exec"
or "vagrant ssh" for the new encapsulation method. You would need to do
a few things to implement them for other "encapsulation" mechanisms:
    1) write a discovery agent for that kind of encapsulation (similar
to the docker and vagrant discovery modules), and add it to the default
discovery methods in the cmaconfig.py file.
    2) Modify the assim_run_in_context() function in the assim_common.sh
script to run commands in the new encapsulation method.

>
>
> Thanks so much for your time!
> Josh
>
Hope that helps! Let me know what else you want to know. And I'll go
look for that bug.


-- 

Alan Robertson / CTO
[email protected] <mailto:[email protected]>/ +1
303.947.7999

Assimilation Systems Limited
http://AssimilationSystems.com

Twitter <https://twitter.com/ossalanr> Linkedin
<https://www.linkedin.com/in/alanr> skype
<https://htmlsig.com/skype?username=alanr_unix.sh>

Attachment: cmaconfig.json
Description: application/json

_______________________________________________
Assimilation mailing list - Discovery-Driven Monitoring
[email protected]
http://lists.community.tummy.com/cgi-bin/mailman/listinfo/assimilation
http://assimmon.org/

Reply via email to