{"id":25382992,"url":"https://github.com/jahands/axiom-powershell","last_synced_at":"2025-04-09T13:57:11.389Z","repository":{"id":188658160,"uuid":"679168932","full_name":"jahands/axiom-powershell","owner":"jahands","description":"A PowerShell module for axiom.co","archived":false,"fork":false,"pushed_at":"2023-08-18T13:56:06.000Z","size":3,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-02T13:19:24.784Z","etag":null,"topics":["powershell","powershell-module"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jahands.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-16T08:45:22.000Z","updated_at":"2023-08-16T09:04:11.000Z","dependencies_parsed_at":"2025-02-15T08:02:50.797Z","dependency_job_id":null,"html_url":"https://github.com/jahands/axiom-powershell","commit_stats":null,"previous_names":["jahands/axiom-powershell"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jahands%2Faxiom-powershell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jahands%2Faxiom-powershell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jahands%2Faxiom-powershell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jahands%2Faxiom-powershell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jahands","download_url":"https://codeload.github.com/jahands/axiom-powershell/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248054217,"owners_count":21039951,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["powershell","powershell-module"],"created_at":"2025-02-15T07:52:43.780Z","updated_at":"2025-04-09T13:57:11.362Z","avatar_url":"https://github.com/jahands.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# axiom-powershell\nA PowerShell module for [Axiom.co](https://axiom.co/)\n\n## Examples\n\n### Log a message\n\n```powershell\nImport-Module $PSScriptRoot/AxiomLogger.psm1\n\n$logger = New-AxiomLogger `\n\t-ApiToken $env:AXIOM_TOKEN `\n\t-DataSetName 'mini-backups' `\n\t-Tags @{\n\t\t\"server\" = \"mini\"\n\t\t\"source\" = \"backup.ps1\"\n\t}\n\n# Optionally set custom flush settings\n$logger.FlushAfterSeconds(5) # default 10\n$logger.FlushAfterLogs(10) # Default 20\n\n# Log some data\n$logger.Log(@{\n\t\"message\" = \"Backup started\"\n\t\"level\" = \"info\"\n})\n\n# ... do some work\n\n$logger.Flush() # Flush remaining logs\n```\n\n### Pipe rclone logs into Axiom\n\n```powershell\nImport-Module $PSScriptRoot/AxiomLogger.psm1\n\nrclone --use-json-log copy ./ ../tmp --dry-run 2\u003e\u00261 | ForEach-Object {\n\tif ($_.ToString().StartsWith('{\"level\":')) {\n\t\t# Send json logs directly to Axiom\n\t\t$logger.Log((ConvertFrom-Json $_))\n\t} else {\n\t\t# Send non-json logs as info\n\t\t$logger.Log(@{\n\t\t\t\t\"msg\"   = $_\n\t\t\t\t\"level\" = \"info\"\n\t\t\t})\n\t}\n}\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjahands%2Faxiom-powershell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjahands%2Faxiom-powershell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjahands%2Faxiom-powershell/lists"}