c8y(1)
π c8y-alarms-create β Create alarm π
Okay bestie, welcome to the c8y manual! This page is literally all about making alarms pop off on a device or agent. No cap, it's giving main character energy for your monitoring setup. β¨
πΈ SYNOPSIS πΈ
c8y alarms create [flags]
π¦ DESCRIPTION π¦
So here's the vibe: you use this to create an alarm on a device or agent. That's it, that's the whole mood. Slay. π
β¨ OPTIONS β¨
Ugh, okay, there are a lot of these but don't stress β I got you. Every single flag is right here, no gatekeeping. π«Ά
-d,--data=[]β static data to be applied to body. accepts json or shorthand json, i.e.--data 'value1=1,my.nested.value=100'. Lowkey iconic for injecting exactly what you want. π--device=[]β The ManagedObject that the alarm originated from (accepts pipeline). This is the whole "where did this alarm come from" situation. π¦-h,--help[=false]β help for create. When you're lost, just ask for help, bestie. π--processingMode=""β Cumulocity processing mode. It's giving "backend vibes only." β¨--severity=""β The severity of the alarm:CRITICAL,MAJOR,MINORorWARNING. Must be upper-case. Periodt. No lowercase nonsense allowed. π--status=""β The status of the alarm:ACTIVE,ACKNOWLEDGEDorCLEARED. If status was not appeared, new alarm will have statusACTIVE. Must be upper-case. We love a default. π--template=""β Body template. For when you want that custom aesthetic. π¨--templateVars=[]β Body template variables. The little details that make it hit different. β¨--text=""β Text description of the alarm. Say what you mean, bestie. π¬--time=""β Time of the alarm. Defaults to current timestamp. If you don't specify, it just uses "now." Slay. β°--type=""β Identifies the type of this alarm, e.g.'com_cumulocity_events_TamperEvent'. Gotta label your alarm correctly, iykyk. π
π§ OPTIONS INHERITED FROM PARENT COMMANDS π§
These are the flags that come from the parent command β they're not new, but they're still valid and you need to know them. Respect the lineage. π
--abortOnErrors=10β Abort batch when reaching specified number of errors. Sometimes you just gotta know when to stop. π--allowEmptyPipe[=false]β Don't fail when piped input is empty (stdin). Forgiving queen behavior. π«Ά--cache[=false]β Enable cached responses. Speed is sexy. β‘--cacheBodyPaths=[]β Cache should limit hashing of selected paths in the json body. Empty indicates all values. Very "only the important stuff" energy. π―--cacheTTL="60s"β Cache time-to-live (TTL) as a duration, i.e.60s,2m. Don't let that cache get stale, bestie. β-c,--compact[=false]β Compact instead of pretty-printed output when using json output. Pretty print is the default if output is the terminal. Sometimes you want it neat, sometimes you want it compact. Both are valid. β¨--confirm[=false]β Prompt for confirmation. Are you sure? Are you sure sure? π--confirmText=""β Custom confirmation text. Make it say whatever you want. π¬--currentPage=0β Current page which should be returned. Page one is where it's at. π--customQueryParam=[]β add custom URL query parameters. i.e.--customQueryParam 'withCustomOption=true,myOtherOption=myvalue'. For the girlies who need extra customization. π--debug[=false]β Set very verbose log messages. When you need to see everything. π--delay="0ms"β delay after each request, i.e.5ms,1.2s. Patience is a virtue, fr fr. β³--delayBefore="0ms"β delay before each request, i.e.5ms,1.2s. Sometimes you gotta wait before you go. π°οΈ--dry[=false]β Dry run. Don't send any data to the server. Just practice. No commitment. π--dryFormat="markdown"β Dry run output format. i.e.json,dump,markdownorcurl. Pick your aesthetic. π¨--examples[=false]β Show examples for the current command. We love a tutorial moment. π--filter=[]β Apply a client side filter to response before returning it to the user. Only show what you want to see. π―--flatten[=false]β flatten json output by replacing nested json properties with properties where their names are represented by dot notation. Making it all flat and easy. π«Ά-f,--force[=false]β Do not prompt for confirmation. Ignored when using--confirm. No time for questions, just do it. π₯-H,--header=[]β custom headers. i.e.--header "Accept: value, AnotherHeader: myvalue". For when you need to add that extra spice. πΆοΈ--includeAll[=false]β Include all results by iterating through each page. Get everything, no cap. π-k,--insecure[=false]β Allow insecure server connections when using SSL. Proceed with caution, bestie. π-l,--logMessage=""β Add custom message to the activity log. Leave your mark. π--maxJobs=0β Maximum number of jobs.0= unlimited (use with caution!). Be careful, okay? β οΈ--noAccept[=false]β Ignore Accept header will remove the Accept header from requests, howeverPUTandPOSTrequests will only see the effect. Technical behavior, but we respect it. π§--noCache[=false]β Force disabling of cached responses (overwrites cache setting). Fresh data only. π-M,--noColor[=false]β Don't use colors when displaying log entries on the console. For when you want a minimalist aesthetic. π€--noLog[=false]β Disables the activity log for the current command. Sometimes you want to go off the record. π€«--noProgress[=false]β Disable progress bars. No distractions. π«--noProxy[=false]β Ignore the proxy settings. Direct connection, no middleman. π‘-n,--nullInput[=false]β Don't read the input (stdin). Useful if using in shell for/while loops. Perfect for scripting, bestie. π»-o,--output="table"β Output format i.e.table,json,csv,csvheader. Pick your vibe. π--outputFile=""β Save JSON output to file (after select/view). Save it for later. πΎ--outputFileRaw=""β Save raw response to file (before select/view). The raw, unfiltered version. πΏ--outputTemplate=""β jsonnet template to apply to the output. For the customizable girlies. π-p,--pageSize=5β Maximum results per page. Five at a time. That's the default, periodt. 5οΈβ£--progress[=false]β Show progress bar. This will also disable any other verbose output. Visual confirmation is nice. π--proxy=""β Proxy setting, i.e.http://10.0.0.1:8080. For when you need to go through a middleman. π-r,--raw[=false]β Show raw response. This mode will forceoutput=jsonandview=off. No filter, just vibes. πΏ--retries=3β Max number of attempts when a failed http call is encountered. Try, try again. Three times. π--select=[]β Comma separated list of properties to return. wildcards and globstar accepted, i.e.--select 'id,name,type,**.serialNumber'. Only the good stuff. β¨--session=""β Session configuration. Gotta stay logged in, bestie. π--sessionMode=""β Override default session mode for a single command which would normally be disabled. For the rule-breakers. π΄ββ οΈ-P,--sessionPassword=""β Override session password. Shh, it's a secret. π€«-U,--sessionUsername=""β Override session username. i.e.peterort1234/peter(with tenant). Who you are matters. π€--silentExit[=false]β Silent status codes do not affect the exit code. Sometimes you just don't wanna hear it. π€--silentStatusCodes=""β Status codes which will not print out an error message. No error message, no stress. π--timeout="600s"β Request timeout duration, i.e.60s,2m. Don't wait forever, bestie. β±οΈ--totalPages=0β Total number of pages to get. How many pages do you want? Your call. π-v,--verbose[=false]β Verbose logging. Say more, queen. π£οΈ--view="auto"β Use views when displaying data on the terminal. Disable using--view off. Auto is the default β it just knows. π--withError[=false]β Errors will be printed on stdout instead of stderr. For when you want errors to be part of the main character moment. π--withTotalElements[=false]β Request Cumulocity to include the total elements in the response statistics under.statistics.totalElements(introduced in 10.13). Fancy. π-t,--withTotalPages[=false]β Request Cumulocity to include the total pages in the response statistics under.statistics.totalPages. Page count realness. π--workers=1β Number of workers. One is the default. Multitask if you want. π©βπ»
π EXAMPLE π
Here's the moment you've been waiting for β a real-life example, bestie:
$ c8y alarms create --device 12345 --type c8y_TestAlarm --time "-0s" --text "Test alarm" --severity MAJOR
Create a new alarm for device. That's it. Slay. π
π SEE ALSO π
c8y-alarms(1) β because there's more where that came from. Go explore, bestie. π¦
This page is from the c8y(1) manual, dated Jan 1980. Stay slay, stay secure, and don't forget to check your alarms. πβ¨π
π¦ where this page comes from
- nixpkgs unstable: go-c8y-cli 2.56.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms