Add update_url column to orbit_info (#25532)

Adding new column to ease TUF migration QA and deployment.

![Screenshot 2025-01-17 at 8 24
56 AM](https://github.com/user-attachments/assets/3565fa4c-4bb4-4218-8122-5f3402e02d99)
This commit is contained in:
Lucas Manuel Rodriguez 2025-01-17 11:52:21 -03:00 committed by GitHub
parent 732f46cca7
commit 88a58041a9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 16 additions and 0 deletions

View file

@ -1257,6 +1257,7 @@ func main() {
trw,
startTime,
scriptsEnabledFn,
opt.ServerURL,
)),
)

View file

@ -22,6 +22,7 @@ type Extension struct {
dektopVersion string
trw *token.ReadWriter
scriptsEnabled func() bool
updateURL string
}
var _ orbit_table.Extension = (*Extension)(nil)
@ -29,6 +30,7 @@ var _ orbit_table.Extension = (*Extension)(nil)
func New(
orbitClient *service.OrbitClient, orbitChannel, osquerydChannel, desktopChannel string, desktopVersion string, trw *token.ReadWriter,
startTime time.Time, scriptsEnabled func() bool,
updateURL string,
) *Extension {
return &Extension{
startTime: startTime,
@ -39,6 +41,7 @@ func New(
dektopVersion: desktopVersion,
trw: trw,
scriptsEnabled: scriptsEnabled,
updateURL: updateURL,
}
}
@ -60,6 +63,7 @@ func (o Extension) Columns() []table.ColumnDefinition {
table.TextColumn("desktop_version"),
table.BigIntColumn("uptime"),
table.IntegerColumn("scripts_enabled"),
table.TextColumn("update_url"),
}
}
@ -104,5 +108,6 @@ func (o Extension) GenerateFunc(_ context.Context, _ table.QueryContext) ([]map[
"desktop_version": o.dektopVersion,
"uptime": strconv.FormatInt(int64(time.Since(o.startTime).Seconds()), 10),
"scripts_enabled": strconv.FormatInt(boolToInt(o.scriptsEnabled()), 10),
"update_url": o.updateURL,
}}, nil
}

View file

@ -17870,6 +17870,12 @@
"type": "integer",
"required": false,
"description": "1 if running scripts is enabled, 0 if disabled."
},
{
"name": "update_url",
"type": "text",
"required": false,
"description": "The Update Framework server URL."
}
],
"notes": "This table is not a core osquery table. It is included as part of Fleet's agent ([fleetd](https://fleetdm.com/docs/get-started/anatomy#fleetd)).",

View file

@ -45,5 +45,9 @@ columns:
type: integer
required: false
description: 1 if running scripts is enabled, 0 if disabled.
- name: update_url
type: text
required: false
description: The Update Framework server URL.
notes: This table is not a core osquery table. It is included as part of Fleet's agent ([fleetd](https://fleetdm.com/docs/get-started/anatomy#fleetd)).
evented: false