Resource Files - Macros
Posted: Mon Mar 12, 2018 10:52 am
Hello,
Hopefully a couple easy questions.
I added the NCPA token as a user macro to the resource file. When I run check_ncpa.py with the token it returns results but when I substitute the Macro it returns "error": "Incorrect credentials given."
Questions:
1. Where can I find the log that'll tell me what the macro is resolving as?
2. Do I need to restart anything after making changes to the resource file?
3. Are special characters from resource files stripped by default?
4. foo8?18bAr (not my actual token). The only line I added to resource.cfg was
4.a := $USER9$=foo8?18bAr
5. Do I need to include the path or is the syntax of my check given below correct?
5.a the difference between the first code block & the second is that the first includes the dollar signs $USER9$.
Thanks for your help.
Cheers,
Maxwell Ramirez
Hopefully a couple easy questions.
I added the NCPA token as a user macro to the resource file. When I run check_ncpa.py with the token it returns results but when I substitute the Macro it returns "error": "Incorrect credentials given."
Questions:
1. Where can I find the log that'll tell me what the macro is resolving as?
2. Do I need to restart anything after making changes to the resource file?
3. Are special characters from resource files stripped by default?
4. foo8?18bAr (not my actual token). The only line I added to resource.cfg was
4.a := $USER9$=foo8?18bAr
5. Do I need to include the path or is the syntax of my check given below correct?
5.a the difference between the first code block & the second is that the first includes the dollar signs $USER9$.
Code: Select all
[e132206@gcxsp0006 libexec]$ ./check_ncpa.py -H nrxav0089 -t $USER9$ -M 'memory/virtual/percent' -v
Connecting to: https://nrxav0089:5693/api/memory/virtual/percent/?token=%24&check=1
File returned contained:
{
"error": "Incorrect credentials given."
}
Code: Select all
[e132206@gcxsp0006 libexec]$ ./check_ncpa.py -H nrxav0089 -t USER9 -M 'memory/virtual/percent' -v
Connecting to: https://nrxav0089:5693/api/memory/virtual/percent/?token=USER9&check=1
File returned contained:
{
"error": "Incorrect credentials given."
}
An error occurred:'stdout'
Code: Select all
[e132206@gcxsp0006 libexec]$ ./check_ncpa.py -H nrxav0089 -t foo8?18bAr -M 'memory/virtual/percent'
OK: Percent was 20.60 % | 'percent'=20.60%;;;
Cheers,
Maxwell Ramirez