From f16372d41b4d2de8d3b28e5ef80bd8cbd13451c3 Mon Sep 17 00:00:00 2001 From: Nick Anderson Date: Mon, 24 Nov 2025 13:58:18 -0600 Subject: [PATCH] Fixed Table/View and proper capitalization of names When I was vibe coding over the weekend, the inaccuracy of the documentation was sending my agent off in the wrong direction. It kept trying to use queries with the documented capitalization as I fed it that context for the schema. This change fixes the documentation to correctly reflect the actual state of the database with proper capitalization and identification of View vs Table. --- .../sql-schema/cfdb.markdown | 354 +++++++++--------- 1 file changed, 177 insertions(+), 177 deletions(-) diff --git a/content/api/enterprise-api-ref/sql-schema/cfdb.markdown b/content/api/enterprise-api-ref/sql-schema/cfdb.markdown index 96eccd8ff..91a5c281e 100644 --- a/content/api/enterprise-api-ref/sql-schema/cfdb.markdown +++ b/content/api/enterprise-api-ref/sql-schema/cfdb.markdown @@ -12,22 +12,22 @@ Queries can be used with following database schema. curl -k --user admin:admin https://hub.cfengine.com/api/query -X POST -d "{ \"query\": \"SELECT Hosts.HostName, Hosts.IPAddress FROM Hosts WHERE hostname = 'hub'\"}" ``` -## Table: AgentStatus +## View: agentstatus Agent status contains information about last cf-agent execution. **Columns:** -- **HostKey** _(text)_ +- **hostkey** _(text)_ Unique host identifier. All tables can be joined by `HostKey` to connect data concerning same hosts. -- **AgentExecutionInterval** _(integer)_ +- **agentexecutioninterval** _(integer)_ Estimated interval in which cf-agent is being executed, as cf-agent execution interval is expressed in CFEngine context expressions (Min00_05 etc.) it can be not regular, this interval is discovered by analyzing last few cf-agent execution timestamps. Expressed in seconds. -- **LastAgentLocalExecutionTimeStamp** _(timestamp)_ +- **lastagentlocalexecutiontimestamp** _(timestamp)_ Timestamp of last cf-agent execution on the host. -- **LastAgentExecutionStatus** _(`OK`/`FAIL`)_ +- **lastagentexecutionstatus** _(`OK`/`FAIL`)_ cf-agent execution status. In case cf-agent will not execute within 3x `AgentExecutionInterval` from last execution, status will be set to `FAIL`. Failure may indicate cf-execd issues, or cf-agent crashes. **Example query:** @@ -60,28 +60,28 @@ lastagentlocalexecutiontimestamp | 2015-03-11 12:36:51+00 lastagentexecutionstatus | OK ``` -## Table: BenchmarksLog +## View: benchmarkslog Data from internal cf-agent monitoring as also [measurements promises][measurements]. **Columns:** -- **HostKey** _(text)_ +- **hostkey** _(text)_ Unique host identifier. All tables can be joined by `HostKey` to connect data concerning same hosts. -- **EventName** _(text)_ +- **eventname** _(text)_ Name of measured event. -- **StandardDeviation** _(numeric)_ +- **standarddeviation** _(numeric)_ Dispersion of a set of data from its mean. -- **AverageValue** _(numeric)_ +- **averagevalue** _(numeric)_ Average value. -- **LastValue** _(numeric)_ +- **lastvalue** _(numeric)_ Last measured value. -- **CheckTimeStamp** _(timestamp)_ +- **checktimestamp** _(timestamp)_ Measurement time. **Example query:** @@ -122,22 +122,22 @@ lastvalue | 1.002346 checktimestamp | 2015-03-10 14:05:20+00 ``` -## Table: Contexts +## View: contexts CFEngine contexts present on hosts at their last reported cf-agent execution. **Columns:** -- **HostKey** _(text)_ +- **hostkey** _(text)_ Unique host identifier. All tables can be joined by `HostKey` to connect data concerning same hosts. -- **ContextName** _(text)_ +- **contextname** _(text)_ CFEngine [context][Classes and decisions] set by cf-agent. -- **MetaTags** _(text[])_ +- **metatags** _(text[])_ List of [meta tags][Tags for variables, classes, and bundles] set for the context. -- **ChangeTimeStamp** _(timestamp)_ +- **changetimestamp** _(timestamp)_ Timestamp since when context is set in its current form. **Note:** If any of the context attributes change, the timestamp will be updated. @@ -171,30 +171,30 @@ metatags | {inventory,attribute_name=none,source=agent,hardclass} changetimestamp | 2015-03-11 09:50:11+00 ``` -## Table: ContextsLog +## View: contextslog CFEngine contexts set on hosts by CFEngine over period of time. **Columns:** -- **HostKey** _(text)_ +- **hostkey** _(text)_ Unique host identifier. All tables can be joined by `HostKey` to connect data concerning same hosts. -- **ChangeTimeStamp** _(timestamp)_ +- **changetimestamp** _(timestamp)_ Timestamp since when context is set in its current form. **Note:** The statement if true till present time or newer entry claims otherwise. -- **ChangeOperation** _(`ADD`,`CHANGE`,`REMOVE`,`UNTRACKED`)_ +- **changeoperation** _(`ADD`,`CHANGE`,`REMOVE`,`UNTRACKED`)_ CFEngine uses incremental diffs to report it's state. `ChangeOperation` is a diff state describing current entry. - `ADD` - stands for introducing a new entry which did not exist before. In this case, new CFEngine context have been introduced. - `CHANGE` - stands for changing value or attribute such as `MetaTags` have changed. - `REMOVE` - Context have not been set. - `UNTRACKED` - CFEngine provides a mechanism for filtering unwanted data from being reported. `UNTRACKED` marker states that information about this context is being filtered and will not report any future information about it. -- **ContextName** _(text)_ +- **contextname** _(text)_ CFEngine [context][Classes and decisions] set by cf-agent. -- **MetaTags** _(text[])_ +- **metatags** _(text[])_ List of [meta tags][Tags for variables, classes, and bundles] set for the context. **Example query:** @@ -231,31 +231,31 @@ contextname | nova_3_6_5 metatags | {inventory,attribute_name=none,source=agent,hardclass} ``` -## Table: FileChangesLog +## View: filechangeslog Log of changes detected to files that are set to be [monitored][files#changes] by cf-agent. **Columns:** -- **HostKey** _(text)_ +- **hostkey** _(text)_ Unique host identifier. All tables can be joined by `HostKey` to connect data concerning same hosts. -- **PromiseHandle** _(text)_ +- **promisehandle** _(text)_ A Uniqueue id-tag string for referring promise. -- **FileName** _(text)_ +- **filename** _(text)_ Name of the file that have changed. -- **ChangeTimeStamp** _(timestamp)_ +- **changetimestamp** _(timestamp)_ Timestamp when CFEngine have detected the change to the file. -- **ChangeType** _(text)_ +- **changetype** _(text)_ Type of change detected on the monitored file. - DIFF - change in content (with file diff) - S - change in file stats - C - change in content (based on file hash) -- **ChangeDetails** _(text[])_ +- **changedetails** _(text[])_ Information about changes detected to the file. Such as file stats information, file diff etc. **Example query:** @@ -296,30 +296,30 @@ changetype | S changedetails | {"Modified time: Mon Mar 9 11:37:50 -> Mon Mar 9 11:42:27"} ``` -## Table: Hosts +## View: hosts Hosts table contains basic information about hosts managed by CFEngine. **Columns:** -- **HostKey** _(text)_ +- **hostkey** _(text)_ Unique host identifier. All tables can be joined by `HostKey` to connect data concerning same hosts. -- **HostName** _(text)_ +- **hostname** _(text)_ Host name locally detected on the host, configurable as `hostIdentifier` option in [Settings API][Status and settings REST API#Get settings] and Mission Portal settings UI. -- **IPAddress** _(text)_ +- **ipaddress** _(text)_ IP address of the host derived from the lastseen database (this is expected to be the IP address from which connections come from, beware NAT will cause multiple hosts to appear to have the same IP address). -- **LastReportTimeStamp** _(timestamp)_ +- **lastreporttimestamp** _(timestamp)_ Timestamp of the most recent successful report collection. -- **FirstReportTimeStamp** _(timestamp)_ +- **firstreporttimestamp** _(timestamp)_ Timestamp when the host reported to the hub for the first time, which indicate when the host was bootstrapped to the hub. @@ -357,23 +357,23 @@ lastreporttimestamp | 2015-03-10 14:20:20+00 firstreporttimestamp | 2015-03-10 13:40:20+00 ``` -## Table: Hosts_not_reported +## View: hosts_not_reported Hosts_not_reported table contains information about not reported hosts. **Columns:** -- **HostKey** _(text)_ +- **hostkey** _(text)_ Unique host identifier. All tables can be joined by `HostKey` to connect data concerning same hosts. - **iscallcollected** _(boolean)_ Is host call collected -- **LastReportTimeStamp** _(timestamp)_ +- **lastreporttimestamp** _(timestamp)_ Timestamp of the most recent successful report collection. -- **FirstReportTimeStamp** _(timestamp)_ +- **firstreporttimestamp** _(timestamp)_ Timestamp when the host reported to the hub for the first time, which indicate when the host was bootstrapped to the hub. @@ -407,22 +407,22 @@ lastreporttimestamp | 2015-03-10 14:20:20+00 firstreporttimestamp | 2015-03-10 13:40:20+00 ``` -## Table: HubConnectionErrors +## View: hubconnectionerrors Networking errors encountered by cf-hub during its operation. **Columns:** -- **HostKey** _(text)_ +- **hostkey** _(text)_ Unique identifier of the host that cf-hub was connecting to. -- **CheckTimeStamp** _(timestamp)_ +- **checktimestamp** _(timestamp)_ Timestamp when the error occurred. -- **Message** _(text)_ +- **message** _(text)_ Error type / message. -- **QueryType** _(text)_ +- **querytype** _(text)_ Type of query that was intended to be sent by hub during failed connection attempt. **Example query:** @@ -455,13 +455,13 @@ message | ServerAuthenticationError querytype | delta ``` -## Table: Inventory +## View: inventory Inventory data **Columns:** -- **HostKey** _(text)_ +- **hostkey** _(text)_ Unique identifier of the host. - **keyname** _(text)_ @@ -506,13 +506,13 @@ metatags | {inventory,source=agent,"attribute_name=Uptime minutes"} value | 4543 ``` -## Table: Inventory_new +## View: inventory_new Inventory data grouped by host **Columns:** -- **HostKey** _(text)_ +- **hostkey** _(text)_ Unique identifier of the host. - **values** _(jsonb)_ @@ -537,7 +537,7 @@ hostkey | SHA=5rt43... values | {"OS": "ubuntu", "OS type": "linux", "CPU model": "CPU model A10", "Host name": "SHA=aa11bb1", "OS kernel": "14.4.0-53-generic", "Interfaces": "pop, imap", "BIOS vendor": "BIOS vendor", "CFEngine ID": "SHA=aa11bb1", "CPU sockets": "229", "New OS type": "linux", "Architecture": "x86_64"} ``` -## Table: LastSeenHosts +## View: lastseenhosts Information about communication between CFEngine clients. Effectively a snapshot of each hosts lastseen database (`cf_lastseen.lmdb`, `cf-key -s`) at the time of @@ -545,24 +545,24 @@ their last reported `cf-agent` execution. **Columns:** -- **HostKey** _(text)_ +- **hostkey** _(text)_ Unique host identifier. All tables can be joined by `HostKey` to connect data concerning same hosts. -- **LastSeenDirection** _(`INCOMING`/`OUTGOING`)_ +- **lastseendirection** _(`INCOMING`/`OUTGOING`)_ Direction within which the connection was established. - `INCOMING` - host received incoming connection. - `OUTGOING` - host opened connection to remote host. -- **RemoteHostKey** _(text)_ +- **remotehostkey** _(text)_ `HostKey` of the remote host. -- **RemoteHostIP** _(text)_ +- **remotehostip** _(text)_ IP address of the remote host. -- **LastSeenTimeStamp** _(timestamp)_ +- **lastseentimestamp** _(timestamp)_ Time when the connection was established. -- **LastSeenInterval** _(real)_ +- **lastseeninterval** _(real)_ Average time period (seconds) between connections for the given `LastSeenDirection` with the host. **Example query:** @@ -603,30 +603,30 @@ lastseentimestamp | 2015-03-13 12:20:45+00 lastseeninterval | 299 ``` -## Table: LastSeenHostsLogs +## View: lastseenhostslogs History of LastSeenHosts table **Columns:** -- **HostKey** _(text)_ +- **hostkey** _(text)_ Unique host identifier. All tables can be joined by `HostKey` to connect data concerning same hosts. -- **LastSeenDirection** _(`INCOMING`/`OUTGOING`)_ +- **lastseendirection** _(`INCOMING`/`OUTGOING`)_ Direction within which the connection was established. - `INCOMING` - host received incoming connection. - `OUTGOING` - host opened connection to remote host. -- **RemoteHostKey** _(text)_ +- **remotehostkey** _(text)_ `HostKey` of the remote host. -- **RemoteHostIP** _(text)_ +- **remotehostip** _(text)_ IP address of the remote host. -- **LastSeenTimeStamp** _(timestamp)_ +- **lastseentimestamp** _(timestamp)_ Time when the connection was established. -- **LastSeenInterval** _(real)_ +- **lastseeninterval** _(real)_ Average time period (seconds) between connections for the given `LastSeenDirection` with the host. **Example query:** @@ -667,7 +667,7 @@ lastseentimestamp | 2015-03-13 12:20:45+00 lastseeninterval | 299 ``` -## Table: MonitoringHg +## View: monitoringhg Stores 1 record for each observable per host. @@ -683,7 +683,7 @@ Stores 1 record for each observable per host. - **ar1** _(real)_ Average across 66 observations. -## Table: MonitoringMgMeta +## View: monitoringmgmeta Stores 1 record for each observable per host. @@ -719,7 +719,7 @@ Stores 1 record for each observable per host. - **lastupdatedsample** _(integer)_ Value of most recently collected measurement. -## Table: MonitoringYrMeta +## View: monitoringyrmeta Stores 1 record for each observable per host. @@ -752,55 +752,55 @@ Stores 1 record for each observable per host. - **lastupdatedsample** _(integer)_ Value of most recently collected measurement. -## Table: PromiseExecutions +## View: promiseexecutions Promises executed on hosts during their last reported cf-agent run. **Columns:** -- **HostKey** _(text)_ +- **hostkey** _(text)_ Unique host identifier. All tables can be joined by `HostKey` to connect data concerning same hosts. -- **PolicyFile** _(text)_ +- **policyfile** _(text)_ Path to the file where the promise is located in. -- **ReleaseId** _(text)_ +- **releaseid** _(text)_ Unique identifier of masterfiles version that is executed on the host. -- **PromiseHash** _(text)_ +- **promisehash** _(text)_ Unique identifier of a promise. It is a hash of all promise attributes and their values. -- **NameSpace** _(text)_ +- **namespace** _(text)_ [Namespace][Namespaces] within which the promise is executed. If no namespace is set then it is set as: `default`. -- **BundleName** _(text)_ +- **bundlename** _(text)_ [Bundle][Bundles] name where the promise is executed. -- **PromiseType** _(text)_ +- **promisetype** _(text)_ [Type][Promise types] of the promise. -- **Promiser** _(text)_ +- **promiser** _(text)_ Object affected by a promise. -- **StackPath** _(text)_ +- **stackpath** _(text)_ Call stack of the promise. -- **PromiseHandle** _(text)_ +- **promisehandle** _(text)_ A unique id-tag string for referring promise. -- **PromiseOutcome** _(`KEPT`/`NOTKEPT`/`REPAIRED`)_ +- **promiseoutcome** _(`KEPT`/`NOTKEPT`/`REPAIRED`)_ Promise execution result. - `KEPT` - System has been found in the state as desired by the promise. CFEngine did not have to do any action to correct the state. - `REPAIRED` - State of the system differed from the desired state. CFEngine took successful action to correct it according to promise specification. - `NOTKEPT` - CFEngine has failed to converge the system according to the promise specification. -- **LogMessages** _(text[])_ +- **logmessages** _(text[])_ List of 5 last messages generated during promise execution. If the promise is `KEPT` the messages are not reported. Log messages can be used for tracking specific changes made by CFEngine while repairing or failing promise execution. -- **Promisees** _(text[])_ +- **promisees** _(text[])_ List of [promisees][Promises] defined for the promise. -- **ChangeTimeStamp** _(timestamp)_ +- **changetimestamp** _(timestamp)_ Timestamp since when the promise is continuously executed by cf-agent in its current configuration and provides the same output. **Note:** If any of the promise dynamic attributes change, like promise outcome, log messages or the new policy version will be rolled out. This timestamp will be changed. @@ -874,7 +874,7 @@ promisees | {} changetimestamp | 2015-03-12 14:52:36+00 ``` -## Table: PromiseExecutionsLog +## View: promiseexecutionslog **This table was deprecated in 3.7.0. It is no longer used.** @@ -882,57 +882,57 @@ Promise status / outcome changes over period of time. **Columns:** -- **HostKey** _(text)_ +- **hostkey** _(text)_ Unique host identifier. All tables can be joined by `HostKey` to connect data concerning same hosts. -- **ChangeTimeStamp** _(timestamp)_ +- **changetimestamp** _(timestamp)_ Timestamp when the promise state or outcome changed. **Note:** The statement if true till present time or newer entry claims otherwise. -- **ChangeOperation** _(`ADD`,`CHANGE`,`REMOVE`,`UNTRACKED`)_ +- **changeoperation** _(`ADD`,`CHANGE`,`REMOVE`,`UNTRACKED`)_ CFEngine uses incremental diffs to report it's state. `ChangeOperation` is a diff state describing current entry. - `ADD` - stands for introducing a new entry which did not exist at last execution. In this case, new promise executed, or the promise was not executed at previous cf-agent run. - `CHANGE` - stands for changing value or attribute such as `PromiseOutcome`, `LogMessages` or `ReleaseId` in case of new policy rollout. - `REMOVE` - Promise was not executed last time, but it was executed previously. This is a common report for promises that have been removed from policy at some point, or they are executed only periodically (like once a hour, day etc.). - `UNTRACKED` - CFEngine provides a mechanism for filtering unwanted data from being reported. `UNTRACKED` marker states that information is being filtered and will not report any future information about it. -- **PolicyFile** _(text)_ +- **policyfile** _(text)_ Path to the file where the promise is located in. -- **ReleaseId** _(text)_ +- **releaseid** _(text)_ Unique identifier of masterfiles version that is executed in the host. -- **PromiseHash** _(text)_ +- **promisehash** _(text)_ Unique identifier of a promise. It is a hash of all promise attributes and their values. -- **NameSpace** _(text)_ +- **namespace** _(text)_ [Namespace][Namespaces] within which the promise is executed. If no namespace is set then it is set as: `default`. -- **BundleName** _(text)_ +- **bundlename** _(text)_ [Bundle][Bundles] name where the promise is executed. -- **PromiseType** _(text)_ +- **promisetype** _(text)_ [Type][Promise types] of the promise. -- **Promiser** _(text)_ +- **promiser** _(text)_ Object affected by a promise. -- **StackPath** _(text)_ +- **stackpath** _(text)_ Call stack of the promise. -- **PromiseHandle** _(text)_ +- **promisehandle** _(text)_ A unique id-tag string for referring promise. -- **PromiseOutcome** _(`KEPT`/`NOTKEPT`/`REPAIRED`)_ +- **promiseoutcome** _(`KEPT`/`NOTKEPT`/`REPAIRED`)_ Promise execution result. - `KEPT` - System has been found in the state as desired by the promise. CFEngine did not have to do any action to correct the state. - `REPAIRED` - State of the system differed from the desired state. CFEngine took successful action to correct it according to promise specification. - `NOTKEPT` - CFEngine has failed to converge the system according to the promise specification. -- **LogMessages** _(text[])_ +- **logmessages** _(text[])_ List of 5 last messages generated during promise execution. If the promise is `KEPT` the messages are not reported. Log messages can be used for tracking specific changes made by CFEngine while repairing or failing promise execution. -- **Promisees** _(text[])_ +- **promisees** _(text[])_ List of [promisees][Promises] defined for the promise. **Example query:** @@ -1009,7 +1009,7 @@ logmessages | {} promisees | {} ``` -## Table: PromiseLog +## View: promiselog History of promises executed on hosts. @@ -1017,10 +1017,10 @@ History of promises executed on hosts. - **id** _(integer)_ -- **HostKey** _(text)_ +- **hostkey** _(text)_ Unique host identifier. All tables can be joined by `HostKey` to connect data concerning same hosts. -- **ChangeTimeStamp** _(timestamp)_ +- **changetimestamp** _(timestamp)_ The GMT time on the host when this state was first perceived. **Note causes of change:** @@ -1029,43 +1029,43 @@ History of promises executed on hosts. - A change in the policy releaseId (cf_promises_release_id) - A change in promise outcome -- **PolicyFile** _(text)_ +- **policyfile** _(text)_ Path to the file where the promise is located in. -- **ReleaseId** _(text)_ +- **releaseid** _(text)_ Unique identifier of masterfiles version that is executed on the host. -- **PromiseHash** _(text)_ +- **promisehash** _(text)_ Unique identifier of a promise. It is a hash of all promise attributes and their values. -- **NameSpace** _(text)_ +- **namespace** _(text)_ [Namespace][Namespaces] within which the promise is executed. If no namespace is set then it is set as: `default`. -- **BundleName** _(text)_ +- **bundlename** _(text)_ [Bundle][Bundles] name where the promise is executed. -- **PromiseType** _(text)_ +- **promisetype** _(text)_ [Type][Promise types] of the promise. -- **Promiser** _(text)_ +- **promiser** _(text)_ Object affected by a promise. -- **StackPath** _(text)_ +- **stackpath** _(text)_ Call stack of the promise. -- **PromiseHandle** _(text)_ +- **promisehandle** _(text)_ A unique id-tag string for referring promise. -- **PromiseOutcome** _(`KEPT`/`NOTKEPT`/`REPAIRED`)_ +- **promiseoutcome** _(`KEPT`/`NOTKEPT`/`REPAIRED`)_ Promise execution result. - `KEPT` - System has been found in the state as desired by the promise. CFEngine did not have to do any action to correct the state. - `REPAIRED` - State of the system differed from the desired state. CFEngine took successful action to correct it according to promise specification. - `NOTKEPT` - CFEngine has failed to converge the system according to the promise specification. -- **LogMessages** _(text[])_ +- **logmessages** _(text[])_ List of 5 last messages generated during promise execution. If the promise is `KEPT` the messages are not reported. Log messages can be used for tracking specific changes made by CFEngine while repairing or failing promise execution. -- **Promisees** _(text[])_ +- **promisees** _(text[])_ List of [promisees][Promises] defined for the promise. **Example query:** @@ -1111,26 +1111,26 @@ promisees | {} changetimestamp | 2018-10-02 00:04:52+00 ``` -## Table: Software +## View: software Software packages installed (according to local package manager) on the hosts. More information about CFEngine and package management can be found [here][packages]. **Columns:** -- **HostKey** _(text)_ +- **hostkey** _(text)_ Unique host identifier. All tables can be joined by `HostKey` to connect data concerning same hosts. -- **SoftwareName** _(text)_ +- **softwarename** _(text)_ Name of installed software package. -- **SoftwareVersion** _(text)_ +- **softwareversion** _(text)_ Software package version. -- **SoftwareArchitecture** _(text)_ +- **softwarearchitecture** _(text)_ Architecture. -- **ChangeTimeStamp** _(timestamp)_ +- **changetimestamp** _(timestamp)_ Timestamp when the package was discovered / installed on the host. **Example query:** @@ -1167,29 +1167,29 @@ softwarearchitecture | default changetimestamp | 2015-03-12 10:20:18+00 ``` -## Table: SoftwareUpdates +## View: softwareupdates Patches available for installed packages on the hosts (as reported by local package manager). The most up to date patch will be listed. **Columns:** -- **HostKey** _(text)_ +- **hostkey** _(text)_ Unique host identifier. All tables can be joined by `HostKey` to connect data concerning same hosts. -- **PatchName** _(text)_ +- **patchname** _(text)_ Name of the software. -- **PatchVersion** _(text)_ +- **patchversion** _(text)_ Patch version. -- **PatchArchitecture** _(text)_ +- **patcharchitecture** _(text)_ Architecture of the patch. -- **PatchReportType** _(`INSTALLED`/`AVAILABLE`)_ +- **patchreporttype** _(`INSTALLED`/`AVAILABLE`)_ Patch status (`INSTALLED` status is specific only to SUSE Linux). -- **ChangeTimeStamp** _(timestamp)_ +- **changetimestamp** _(timestamp)_ Timestamp when the new patch / version was discovered as available on the host. **Example query:** @@ -1230,32 +1230,32 @@ patchreporttype | AVAILABLE changetimestamp | 2015-03-12 10:20:18+00 ``` -## Table: SoftwareLog +## View: softwarelog Software packages installed / deleted over period of time. More information about CFEngine and package management can be found [here][packages]. **Columns:** -- **HostKey** _(text)_ +- **hostkey** _(text)_ Unique host identifier. All tables can be joined by `HostKey` to connect data concerning same hosts. -- **ChangeTimeStamp** _(timestamp)_ +- **changetimestamp** _(timestamp)_ Timestamp when the package state was discovered on the host. **Note:** The statement if true till present time or newer entry claims otherwise. -- **ChangeOperation** _(`ADD`,`REMOVE`)_ +- **changeoperation** _(`ADD`,`REMOVE`)_ CFEngine uses incremental diffs to report it's state. `ChangeOperation` is a diff state describing current entry. - `ADD` - New package have been detected / installed. Package upgrate is considered as installing a new package with a different version. - `REMOVE` - Package have been detected to be removed / uninstalled. During upgrate older version of the package is removed and reported as so. -- **SoftwareName** _(text)_ +- **softwarename** _(text)_ Name of installed software package. -- **SoftwareVersion** _(text)_ +- **softwareversion** _(text)_ Software package version. -- **SoftwareArchitecture** _(text)_ +- **softwarearchitecture** _(text)_ Architecture. **Example query:** @@ -1296,7 +1296,7 @@ softwareversion | 1.9.3.484-2ubuntu1.2 softwarearchitecture | default ``` -## Table: SoftwareUpdatesLog +## View: softwareupdateslog **This table was deprecated in 3.7.0. It is no longer used.** @@ -1304,29 +1304,29 @@ Patches available for installed packages on the hosts (as reported by local pack **Columns:** -- **HostKey** _(text)_ +- **hostkey** _(text)_ Unique host identifier. All tables can be joined by `HostKey` to connect data concerning same hosts. -- **ChangeTimeStamp** _(timestamp)_ +- **changetimestamp** _(timestamp)_ Timestamp when the patch state was discovered on the host. **Note:** The statement if true till present time or newer entry claims otherwise. -- **ChangeOperation** _(`ADD`,`REMOVE`)_ +- **changeoperation** _(`ADD`,`REMOVE`)_ CFEngine uses incremental diffs to report it's state. `ChangeOperation` is a diff state describing current entry. - `ADD` - New patch have been detected. This is a common in case of release of new patch version or new package was installed that have an upgrate available. - `REMOVE` - Patch is not longer available. Patch may be replaced with newer version, or installed package have been upgrated. **Note:** CFEngine reports only the most up to date version available. -- **PatchName** _(text)_ +- **patchname** _(text)_ Name of the software. -- **PatchVersion** _(text)_ +- **patchversion** _(text)_ Patch version. -- **PatchArchitecture** _(text)_ +- **patcharchitecture** _(text)_ Architecture of the patch. -- **PatchReportType** _(`INSTALLED`/`AVAILABLE`)_ +- **patchreporttype** _(`INSTALLED`/`AVAILABLE`)_ Patch status (`INSTALLED` status is specific only to SUSE Linux). **Example query:** @@ -1371,7 +1371,7 @@ patcharchitecture | default patchreporttype | AVAILABLE ``` -## Table: Status +## View: status Statuses of report collection. cf-hub records all collection attempts and whether they are FAILEDC or CONSUMED. CONSUMED means next one will be delta. FAILEDC means next one will be REBASE. @@ -1443,36 +1443,36 @@ patcharchitecture | default patchreporttype | AVAILABLE ``` -## Table: Variables +## View: variables Variables and their values set on hosts at their last reported cf-agent execution. **Columns:** -- **HostKey** _(text)_ +- **hostkey** _(text)_ Unique host identifier. All tables can be joined by `HostKey` to connect data concerning same hosts. -- **NameSpace** _(text)_ +- **namespace** _(text)_ [Namespace][Namespaces] within which the variable is set. If no namespace is set then it is set as: `default`. -- **Bundle** _(text)_ +- **bundle** _(text)_ [Bundle][Bundles] name where the variable is set. -- **VariableName** _(text)_ +- **variablename** _(text)_ Name of the variable. -- **VariableValue** _(text)_ +- **variablevalue** _(text)_ Variable value serialized to string. - List types such as: `slist`, `ilist`, `rlist` are serialized with CFEngine list format: {'value','value'}. - `Data` type is serialized as JSON string. -- **VariableType** _(text)_ +- **variabletype** _(text)_ Type of the variable. [List][Variables] of supported variable types. -- **MetaTags** _(text[])_ +- **metatags** _(text[])_ List of [meta tags][Tags for variables, classes, and bundles] set for the variable. -- **ChangeTimeStamp** _(timestamp)_ +- **changetimestamp** _(timestamp)_ Timestamp since when variable is set in its current form. **Note:** If any of variable attributes change such as its `VariableValue` or `Bundle`, the timestamp will be updated. @@ -1522,27 +1522,27 @@ metatags | {source=promise,report} changetimestamp | 2015-03-11 14:27:12+00 ``` -## Table: Variables_dictionary +## Table: variables_dictionary Inventory attributes, these data are using in [List of inventory attributes API][Inventory API#List of inventory attributes] **Columns:** -- **Id** _(integer)_ +- **id** _(integer)_ Auto incremental ID -- **Attribute_name** _(text)_ +- **attribute_name** _(text)_ Attribute name -- **Category** _(text)_ _(`Hardware`,`Software`,`Network`, `Security`, `User defined`)_ +- **category** _(text)_ _(`Hardware`,`Software`,`Network`, `Security`, `User defined`)_ Attribute category -- **Readonly** _(integer)_ _(`0`,`1`)_ +- **readonly** _(integer)_ _(`0`,`1`)_ Is attribute readonly -- **Type** _(text)_ +- **type** _(text)_ Type of the attribute. [List][Variables] of supported variable types. - **convert_function** _(text)_ Convert function. Emp.: `cf_clearSlist` - to transform string like `{"1", "2"}` to `1, 2` - **keyname** _(text)_ Key name -- **Enabled** _(integer)_ _(`0`,`1`)_ +- **enabled** _(integer)_ _(`0`,`1`)_ Is attribute enabled for the API **Example query:** @@ -1576,44 +1576,44 @@ convert_function| cf_clearSlist enabled | 1 ``` -## Table: VariablesLog +## View: variableslog CFEngine variables set on hosts by CFEngine over period of time. **Columns:** -- **HostKey** _(text)_ +- **hostkey** _(text)_ Unique host identifier. All tables can be joined by `HostKey` to connect data concerning same hosts. -- **ChangeTimeStamp** _(timestamp)_ +- **changetimestamp** _(timestamp)_ Timestamp since when variable is set in its current form. **Note:** The statement if true till present time or newer entry claims otherwise. -- **ChangeOperation** _(`ADD`,`CHANGE`,`REMOVE`,`UNTRACKED`)_ +- **changeoperation** _(`ADD`,`CHANGE`,`REMOVE`,`UNTRACKED`)_ CFEngine uses incremental diffs to report it's state. `ChangeOperation` is a diff state describing current entry. - `ADD` - stands for introducing a new entry which did not exist before. In this case, new CFEngine variable have been introduced. - `CHANGE` - stands for changing value or attribute such as `VariableValue` or `MetaTags` have changed. - `REMOVE` - Variable have not been set. - `UNTRACKED` - CFEngine provides a mechanism for filtering unwanted data from being reported. `UNTRACKED` marker states that information is being filtered and will not report any future information about it. -- **NameSpace** _(text)_ +- **namespace** _(text)_ [Namespace][Namespaces] within which the variable is set. If no namespace is set then it is set as: `default`. -- **Bundle** _(text)_ +- **bundle** _(text)_ [Bundle][Bundles] name where the variable is set. -- **VariableName** _(text)_ +- **variablename** _(text)_ Name of the variable. -- **VariableValue** _(text)_ +- **variablevalue** _(text)_ Variable value serialized to string. - List types such as: `slist`, `ilist`, `rlist` are serialized with CFEngine list format: {'value','value'}. - `Data` type is serialized as JSON string. -- **VariableType** _(text)_ +- **variabletype** _(text)_ Type of the variable. [List][Variables] of supported variable types. -- **MetaTags** _(text[])_ +- **metatags** _(text[])_ List of [meta tags][Tags for variables, classes, and bundles] set for the variable. **Example query:** @@ -1666,23 +1666,23 @@ variabletype | string metatags | {monitoring,source=environment} ``` -## Table: v_hosts +## View: v_hosts V_hosts table contains information about hosts. **Columns:** -- **HostKey** _(text)_ +- **hostkey** _(text)_ Unique host identifier. All tables can be joined by `HostKey` to connect data concerning same hosts. - **iscallcollected** _(boolean)_ Is host call collected -- **LastReportTimeStamp** _(timestamp)_ +- **lastreporttimestamp** _(timestamp)_ Timestamp of the most recent successful report collection. -- **FirstReportTimeStamp** _(timestamp)_ +- **firstreporttimestamp** _(timestamp)_ Timestamp when the host reported to the hub for the first time, which indicate when the host was bootstrapped to the hub. @@ -1716,31 +1716,31 @@ lastreporttimestamp | 2015-03-10 14:20:20+00 firstreporttimestamp | 2015-03-10 13:40:20+00 ``` -## Table: vm_hosts +## View: vm_hosts vm_hosts table contains basic information about hosts managed by CFEngine. In this table data are cached what gives a better query performance **Columns:** -- **HostKey** _(text)_ +- **hostkey** _(text)_ Unique host identifier. All tables can be joined by `HostKey` to connect data concerning same hosts. -- **HostName** _(text)_ +- **hostname** _(text)_ Host name locally detected on the host, configurable as `hostIdentifier` option in [Settings API][Status and settings REST API#Get settings] and Mission Portal settings UI. -- **IPAddress** _(text)_ +- **ipaddress** _(text)_ IP address of the host derived from the lastseen database (this is expected to be the IP address from which connections come from, beware NAT will cause multiple hosts to appear to have the same IP address). -- **LastReportTimeStamp** _(timestamp)_ +- **lastreporttimestamp** _(timestamp)_ Timestamp of the most recent successful report collection. -- **FirstReportTimeStamp** _(timestamp)_ +- **firstreporttimestamp** _(timestamp)_ Timestamp when the host reported to the hub for the first time, which indicate when the host was bootstrapped to the hub.