Ontology¶
Black Fox uses a modular ontology under the namespace
https://blackfox.io/ontology/core# (prefix bf:). You can extend one module
without touching the others.
The namespace IRI is an identifier only. It does not serve the vocabulary
files. Read them from the ontology/ directory of the repository.
| Module | Covers |
|---|---|
core |
bf:Resource, environments, applications, teams, hosts, observation reifications |
kafka |
clusters, brokers, topics, partitions, consumer groups, connectors, schema subjects |
observability |
metric series and observation vocabulary |
provenance |
collectors, configuration snapshots, change events (aligned to PROV-O) |
security |
access-control vocabulary for locked-down deployments |
Core classes and properties¶
bf:Resource a owl:Class .
bf:Application rdfs:subClassOf bf:Resource .
bf:Team rdfs:subClassOf bf:Resource .
bf:KafkaCluster rdfs:subClassOf bf:Resource .
bf:Broker rdfs:subClassOf bf:Resource .
bf:Topic rdfs:subClassOf bf:Resource .
bf:ConsumerGroup rdfs:subClassOf bf:Resource .
bf:producesTo a owl:ObjectProperty ; rdfs:domain bf:Application ; rdfs:range bf:Topic .
bf:consumesFrom a owl:ObjectProperty ; rdfs:domain bf:Application ; rdfs:range bf:Topic .
bf:belongsToCluster a owl:ObjectProperty ; rdfs:range bf:KafkaCluster .
bf:ownedBy a owl:ObjectProperty ; rdfs:range bf:Team .
Provenance and confidence¶
For each relationship that arrives through the observation API, Black Fox
stores the triple and a bf:RelationshipObservation that records its subject,
predicate and object, a bf:confidence between 0 and 1, a bf:evidenceSource
and the observation time. A bf:ResourceObservation records the collector
type and instance. The sample data in ontology/example.ttl is loaded as
plain triples without these records.
The provenance module aligns three classes with PROV-O:
bf:Collector rdfs:subClassOf prov:SoftwareAgent .
bf:ConfigurationSnapshot rdfs:subClassOf prov:Entity .
bf:ChangeEvent rdfs:subClassOf prov:Activity .
These records are the input for reconciling several sources and for reasoning over time. Neither is implemented yet.
Validation with SHACL¶
ontology/shapes.ttl describes valid topics, brokers and relationship
observations. The service does not run SHACL validation at ingestion yet. You
can validate an export of the graph with any SHACL engine. An excerpt:
bf:TopicShape a sh:NodeShape ;
sh:targetClass bf:Topic ;
sh:property [ sh:path bf:externalId ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:string ] ;
sh:property [ sh:path bf:belongsToCluster ; sh:minCount 1 ; sh:maxCount 1 ; sh:class bf:KafkaCluster ] .
bf:RelationshipObservationShape a sh:NodeShape ;
sh:targetClass bf:RelationshipObservation ;
sh:property [ sh:path bf:confidence ; sh:datatype xsd:decimal ;
sh:minInclusive 0 ; sh:maxInclusive 1 ] .
The full vocabularies are in ontology/,
with a JSON-LD context.