c8y(1)

πŸ“¦ version 2.56.1, in nixpkgs unstable

πŸ’… c8y β€” the c8y manual, but make it make sense

okay so bestie, welcome to the c8y(1) page πŸ’– this is the one about setting a device's required availability, and ngl it's lowkey iconic. grab a snack, we're doing this together 🫢


✨ NAME ✨

c8y-devices-availability-set β€” set required availability. that's literally it, that's the whole vibe πŸŽ€


✨ SYNOPSIS ✨

c8y devices availability set [flags]

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea, bestie 🍡 you're setting the required availability of a device. Devices that haven't sent any message within the response interval? Yeah, they're considered unavailable πŸ’€

The response interval can have a value between -32768 and 32767, and any values out of range get shrink to the range borders (yes, that's how it works, don't come for me). Those devices get marked as unavailable (see below πŸ‘‡) and an unavailability alarm is raised πŸ”₯

Devices with a response interval of zero minutes are considered to be under maintenance πŸ› οΈ and no alarm is raised while a device is under maintenance β€” she's resting, leave her alone βœ‹

Devices that do not contain c8y_RequiredAvailability are not monitored. periodt. πŸ™ˆ


πŸ’… OPTIONS πŸ’…

  • -h, --help[=false] β€” help for set. the classic "what does this even do" button πŸ’«
  • --id=[] β€” Device ID (required) (accepts pipeline) πŸ†”
  • --interval=0 β€” Interval in minutes (required) ⏰
  • --processingMode="" β€” Cumulocity processing mode πŸŒ€

🌈 OPTIONS INHERITED FROM PARENT COMMANDS 🌈

okay these ones aren't hers originally, she inherited them from her parent commands, but they still show up to the party πŸ’œ

  • --abortOnErrors=10 β€” Abort batch when reaching specified number of errors πŸ›‘
  • --allowEmptyPipe[=false] β€” Don't fail when piped input is empty (stdin) πŸ«™
  • --cache[=false] β€” Enable cached responses πŸ—„οΈ
  • --cacheBodyPaths=[] β€” Cache should limit hashing of selected paths in the json body. Empty indicates all values 🧺
  • --cacheTTL="60s" β€” Cache time-to-live (TTL) as a duration, i.e. 60s, 2m ⏳
  • -c, --compact[=false] β€” Compact instead of pretty-printed output when using json output. Pretty print is the default if output is the terminal ✨
  • --confirm[=false] β€” Prompt for confirmation πŸ™‹β€β™€οΈ
  • --confirmText="" β€” Custom confirmation text ✍️
  • --currentPage=0 β€” Current page which should be returned πŸ“„
  • --customQueryParam=[] β€” add custom URL query parameters. i.e. --customQueryParam 'withCustomOption=true,myOtherOption=myvalue' πŸ”—
  • --debug[=false] β€” Set very verbose log messages πŸ›
  • --delay="0ms" β€” delay after each request, i.e. 5ms, 1.2s ⏱️
  • --delayBefore="0ms" β€” delay before each request, i.e. 5ms, 1.2s ⏱️
  • --dry[=false] β€” Dry run. Don't send any data to the server 🧊
  • --dryFormat="markdown" β€” Dry run output format. i.e. json, dump, markdown or curl πŸ“
  • --examples[=false] β€” Show examples for the current command πŸ’‘
  • --filter=[] β€” Apply a client side filter to response before returning it to the user πŸ•΅οΈβ€β™€οΈ
  • --flatten[=false] β€” flatten json output by replacing nested json properties with properties where their names are represented by dot notation πŸͺ„
  • -f, --force[=false] β€” Do not prompt for confirmation. Ignored when using --confirm πŸ’ͺ
  • -H, --header=[] β€” custom headers. i.e. --header "Accept: value, AnotherHeader: myvalue" πŸ“¨
  • --includeAll[=false] β€” Include all results by iterating through each page πŸ“š
  • -k, --insecure[=false] β€” Allow insecure server connections when using SSL πŸ”“ (she's brave, okay)
  • -l, --logMessage="" β€” Add custom message to the activity log πŸ—’οΈ
  • --maxJobs=0 β€” Maximum number of jobs. 0 = unlimited (use with caution!) ⚠️ like fr fr, be careful
  • --noAccept[=false] β€” Ignore Accept header will remove the Accept header from requests, however PUT and POST requests will only see the effect 🚫
  • --noCache[=false] β€” Force disabling of cached responses (overwrites cache setting) 🧹
  • -M, --noColor[=false] β€” Don't use colors when displaying log entries on the console πŸ–€
  • --noLog[=false] β€” Disables the activity log for the current command πŸ”•
  • --noProgress[=false] β€” Disable progress bars 🚫
  • --noProxy[=false] β€” Ignore the proxy settings πŸ™…β€β™€οΈ
  • -n, --nullInput[=false] β€” Don't read the input (stdin). Useful if using in shell for/while loops πŸ”
  • -o, --output="table" β€” Output format i.e. table, json, csv, csvheader πŸ“Š
  • --outputFile="" β€” Save JSON output to file (after select/view) πŸ’Ύ
  • --outputFileRaw="" β€” Save raw response to file (before select/view) πŸ’Ύ
  • --outputTemplate="" β€” jsonnet template to apply to the output 🧩
  • -p, --pageSize=5 β€” Maximum results per page πŸ“–
  • --progress[=false] β€” Show progress bar. This will also disable any other verbose output πŸ“Ά
  • --proxy="" β€” Proxy setting, i.e. http://10.0.0.1:8080 🌐
  • -r, --raw[=false] β€” Show raw response. This mode will force output=json and view=off πŸ₯©
  • --retries=3 β€” Max number of attempts when a failed http call is encountered πŸ”„
  • --select=[] β€” Comma separated list of properties to return. wildcards and globstar accepted, i.e. --select 'id,name,type,**.serialNumber' 🎯
  • --session="" β€” Session configuration πŸ”
  • --sessionMode="" β€” Override default session mode for a single command which would normally be disabled πŸŽ›οΈ
  • -P, --sessionPassword="" β€” Override session password πŸ”‘
  • -U, --sessionUsername="" β€” Override session username. i.e. peter or t1234/peter (with tenant) πŸ‘€
  • --silentExit[=false] β€” Silent status codes do not affect the exit code 🀫
  • --silentStatusCodes="" β€” Status codes which will not print out an error message 🀐
  • --timeout="600s" β€” Request timeout duration, i.e. 60s, 2m βŒ›
  • --totalPages=0 β€” Total number of pages to get πŸ“‘
  • -v, --verbose[=false] β€” Verbose logging πŸ—£οΈ
  • --view="auto" β€” Use views when displaying data on the terminal. Disable using --view off πŸ‘€
  • --withError[=false] β€” Errors will be printed on stdout instead of stderr πŸ“€
  • --withTotalElements[=false] β€” Request Cumulocity to include the total elements in the response statistics under .statistics.totalElements (introduced in 10.13) πŸ”’
  • -t, --withTotalPages[=false] β€” Request Cumulocity to include the total pages in the response statistics under .statistics.totalPages πŸ”’
  • --workers=1 β€” Number of workers πŸ‘·β€β™€οΈ

🌸 EXAMPLE 🌸

okay these are the examples, they're literally so good, look:

$ c8y devices availability set --id 12345 --interval 10
Set the required availability of a device by name to 10 minutes

$ c8y devices get --id device01 --dry=false | c8y devices availability set --interval 10
Set the required availability for a device using pipeline

$ c8y devices list | c8y devices availability set --interval 10
Set the required availability for a list of devices using pipeline

like, the pipeline ones? chef's kiss πŸ‘¨β€πŸ³πŸ’‹ she ate and left no crumbs πŸ”₯


πŸ‘‘ SEE ALSO πŸ‘‘

c8y-devices-availability(1) β€” go read her too, she's the sibling, iykyk πŸ’–


aaaand that's the page bestie πŸ¦‹ she's giving very much "I know what I'm doing and I want you to know too" main character energy ⭐

signing off cutely: this was the c8y page, dated Jan 1980 β€” yeah, vintage, iconic, timeless πŸŽ€ ily, go set some availabilities πŸ’œ

πŸ“¦ where this page comes from