Nagios + check_http with header data
Try passing
check_http ... -k "Cookie: user=4reqrerqwr" -k "Cookie: userlogin=123adsfjlk324"
Related videos on Youtube
Nathaniel Elkins
Updated on September 18, 2022Comments
-
Nathaniel Elkins over 1 year
I must have read at least 50 StackOverflow questions and answers that say that Git cannot track directories. And yet, that is exactly what seems to be happening.
I created a project (.NET, on Windows), and added and committed all the files prior to adding a .gitignore. Realizing my mistake later on, I git rm -r --cached :/ everything, added this .gitignore, and the re-added and committed my files. The thing is, git still tracks my obj and bin folders even though they seem to be ignored in the .gitignore.
Here are the relevant lines from the .gitignore:
[Bb]in/ [Oo]bj/ bin/** obj/**
One or two of those might not make sense, I'm not totally familiar with .gitignore rules and was just trying to see what would stick.
Here's what I get for git status:
Untracked files: (use "git add <file>..." to include in what will be committed) src/main/dotnet/ETB/ETB.Droid/bin/ src/main/dotnet/ETB/ETB.Droid/obj/ src/main/dotnet/ETB/ETB.iOS/bin/ src/main/dotnet/ETB/ETB.iOS/obj/ src/main/dotnet/ETB/ETB/bin/ src/main/dotnet/ETB/ETB/obj/ src/main/dotnet/packages/
This is even after I do something like git rm -r --cached .\src\main\dotnet\ETB\ETB.Droid\bin from the root level. There are also ZERO tracked files from within these directories that appear in the "Changes not staged for commit" section when I do a git status.
I'm really, really stumped. Can anyone help me figure out why I can't ignore these directories completely?
Update
I made the changes that the commenters suggested, and it seemed to solve some, but not all, of my problems (sorry I had it marked answered for a bit there). Relevant lines in my .gitignore at the root level are:
**/[Dd]ebug/** **/bin/** **/obj/**
That first line is probably not necessary, but I figured it couldn't hurt. There is definitely no extra whitespace on any of these lines.
For some reason, only one of the obj directories is still showing up in Git. I even deleted and re-added everything just to try it out.
The offending directory is the ETB.Data directory:
Untracked files: (use "git add <file>..." to include in what will be committed) src/main/dotnet/ETB.Data/
So I ran this command:
git rm -r --cached .\src\main\dotnet\
I then committed those deletes. Then I tried to re-add the directory
git add .\src\main\dotnet
When I look at my status, here is what I'm seeing:
Changes to be committed: (use "git reset HEAD <file>..." to unstage) new file: src/main/dotnet/ETB.Data/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file: src/main/dotnet/ETB.Data/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file: src/main/dotnet/ETB.Data/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file: src/main/dotnet/ETB.sln ... ...
Why do these files keep showing up?! The obj and bin directories in other project directories are being ignored. Does anyone know why this one isn't being ignored?
-
S Nachev over 12 yearsThose cookie values are not credentials, but rather stored cookies AFTER a successful login.
-
murgatroid99 about 9 yearsWhat did you call your
.gitignore
file? -
Dima Pasko about 9 yearstry gitignore.io to get better .gitignore for you
-
-
S Nachev over 12 yearsThanks! I tried that too, but still get the cookie spread over two lines. Cookie: user=4reqrerqwr userlogin=123adsfjlk324
-
S Nachev over 12 yearsI do believe I have tried -k "Cookie: user=4reqrerqwr" -k "Cookie: userlogin=123adsfjlk324" as well, but I will try again just in case. Cheers.
-
S Nachev over 12 yearsThe second Cookie: does not make it..
-
S Nachev over 12 yearsIt looks like Nagios sees the ; as the start of a comment so ignore anything after that. I tried to variablize the entire comment string in a user macro but I always get the same result. It looks like a bug in Nagios.
-
S Nachev over 12 years